staging: comedi: addi_apci_1500: fix digital input 'insn_bits' function
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 17:13:06 +0000 (10:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:21:51 +0000 (11:21 -0800)
commita9c2ba17be3d6c954b2eae9f9820da9c7bb9938f
tree85442906a3517acc059ff082866fe4b61254c8d2
parent7cfa1af0deb1d9c64eb7668355f18dd26788b81d
staging: comedi: addi_apci_1500: fix digital input 'insn_bits' function

This driver does not follow the comedi API. The digital input 'insn_bits'
function is supposed to return the status of all the input channels in
data[1]. Currently this function returns the status in data[0].

Fix the function so it works like the comedi core expects.

The 'insn_read' and 'insn_Write' functions for the digital input subdevice
cannot be removed yet. This driver is again abusing the API and uses these
functions to initialize the board and start/stop "events" generated by the
board. These will be addressed later.

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