OSDN Git Service

staging: comedi: s526: remove s526_ai_insn_config()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 17 Aug 2015 23:58:24 +0000 (16:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:22 +0000 (18:24 -0700)
commit21424e3fa81505f466841eaecaa373f160f44cf4
tree1bf3eea30a5ff99ad000fe3f2a65ae337f06ddf7
parentbf483f1e07d0b292ae5d5fdf94d901fa4415ab38
staging: comedi: s526: remove s526_ai_insn_config()

This (*insn_config) does not follow the comedi core API. It also
would not work as expected.

It appears to be trying to configure the analog input subdevice so
that the (*insn_read) would read multiple channels (data[0]) and
optionally enable the 15us delay (data[1]) needed for the multiplexor
to change channels between samples.

Unfortunately, the comedi core expects (*insn_read) operations to
return 1 or more samples for a single channel, which is what the
(*insn_read) in this driver does.

The (*insn_config) is also enabling the analog input end-of-conversion
interrupt. This isn't needed, and might be a problem since the driver
does not currently request and interrupt. The enable bit does not
need to be set for the end-of-conversion to occur in the interrupt
status register.

Remove the (*insn_config) and modify the (*insn_read) to automatically
handle the 15us delay when needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/s526.c