staging: comedi: addi_apci_3xxx: fix digital input 'insn_bits' function
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 17:01:26 +0000 (10:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:21:37 +0000 (11:21 -0800)
commit10f71c7845686b7f93113f1fe6dbc3718d8a8673
tree2e1dbda714ab49978fbefc9b3dc2f9497c96b573
parent141dcc33c037b7e520ba305caaafbbb39db9e962
staging: comedi: addi_apci_3xxx: 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 is returning the status in data[0]. It
is also unnecessarily testing the size of the return buffer.

Fix the function so it works like the comedi core expects. The core can
then use the function to emulate the 'insn_read' function for individual
channels. This allows removing the i_APCI3XXX_InsnReadDigitalInput()
function.

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_apci3xxx.c
drivers/staging/comedi/drivers/addi_apci_3xxx.c