staging: comedi: addi_apci_1516: fix digital input 'insn_bits' function
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 17:11:21 +0000 (10:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:21:40 +0000 (11:21 -0800)
commit2942ab926b8a64ef48db92fa5d161db4fcf8ed24
tree99224712f0b94d52c628bd7324303404cf21dfb8
parenta4a257039fb580142a30872537a03f4d7d7627e3
staging: comedi: addi_apci_1516: 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 core can
then use the function to emulate the 'insn_read' function for individual
channels.

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_apci1516.c
drivers/staging/comedi/drivers/addi_apci_1516.c