aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/addi_apci_3200.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-11-06 10:03:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-13 11:21:37 -0800
commit2e7be560b7d42413b94d46a5ada25fb0a8f732fc (patch)
treed0e689b962e8ac3137a58c487544a7f025d91ce6 /drivers/staging/comedi/drivers/addi_apci_3200.c
parentstaging: comedi: addi_apci_3200: fix digital input 'insn_bits' function (diff)
downloadlinux-dev-2e7be560b7d42413b94d46a5ada25fb0a8f732fc.tar.xz
linux-dev-2e7be560b7d42413b94d46a5ada25fb0a8f732fc.zip
staging: comedi: addi_apci_3200: fix digital output 'insn_bits' function
This driver does not follow the comedi API. The digital output 'insn_bits' function is passed a mask value in data[0] indicating which output bits in data[1] are changing. The function is then supposed to update the outputs accordingly and then return the current state of the outputs in data[1]. Currently this driver uses the 'insn_write' function to update either a single or all the output channels. And it uses the 'insn_bits' function to read either a single or all the output channel states. Fix the 'insn_bits' function so it works like the comedi core expects. The core can then use the function to emulate the 'insn_read' and 'insn_write' functions 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_apci_3200.c')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_3200.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c
index 432caccdd325..890877febaca 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3200.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3200.c
@@ -51,8 +51,7 @@ static const struct addi_board apci3200_boardtypes[] = {
.ai_cancel = i_APCI3200_StopCyclicAcquisition,
.di_bits = apci3200_di_insn_bits,
.do_config = i_APCI3200_ConfigDigitalOutput,
- .do_write = i_APCI3200_WriteDigitalOutput,
- .do_bits = i_APCI3200_ReadDigitalOutput,
+ .do_bits = apci3200_do_insn_bits,
}, {
.pc_DriverName = "apci3300",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
@@ -82,8 +81,7 @@ static const struct addi_board apci3200_boardtypes[] = {
.ai_cancel = i_APCI3200_StopCyclicAcquisition,
.di_bits = apci3200_di_insn_bits,
.do_config = i_APCI3200_ConfigDigitalOutput,
- .do_write = i_APCI3200_WriteDigitalOutput,
- .do_bits = i_APCI3200_ReadDigitalOutput,
+ .do_bits = apci3200_do_insn_bits,
},
};