]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: addi_apci_3501: fix digital input 'insn_bits' function
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 16:58:02 +0000 (09:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:21:36 +0000 (11:21 -0800)
commit16bc07f5d2f1ecf211f2bd68ed3f2d189ecf5ee6
tree5906618a39f8056e48f232b485f21ac574a18f15
parent8bbd842db020ebc6bcb99a3bd19a902f6b88c7e8
staging: comedi: addi_apci_3501: 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 driver uses the data[0] value passed to the function
to determine if a single input channel status is requested or the status of
all the input channels.

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_apci3501.c
drivers/staging/comedi/drivers/addi_apci_3501.c