aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-12-03 18:15:41 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-07 14:10:01 -0800
commitb82fe57c4d059a8ff1190ead1693d66b868353b2 (patch)
tree8cbe45ad930448961361ceed24c3810eeb1cfa27
parent0774c2b5c1e0025cb016393d8552171c0ec55c39 (diff)
staging: comedi: addi_apci_2032: correct interrupt subdevice
The subdevice type and flags are initialized incorrectly for the interrupt subdevice - the SDF_CMD_READ value belongs in the subdevice flags. Fix it. Also set the number of channels to 2 since there are 2 interrupt sources each with its own status bit. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_2032.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c
index 3b5e1d74d12..f04f59d33cc 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2032.c
@@ -320,9 +320,9 @@ static int apci2032_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[2];
if (dev->irq) {
dev->read_subdev = s;
- s->type = COMEDI_SUBD_DI | SDF_CMD_READ;
- s->subdev_flags = SDF_READABLE;
- s->n_chan = 1;
+ s->type = COMEDI_SUBD_DI;
+ s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
+ s->n_chan = 2;
s->maxdata = 1;
s->range_table = &range_digital;
s->insn_bits = apci2032_int_insn_bits;