Commit b82fe57c authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

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: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0774c2b5
...@@ -320,9 +320,9 @@ static int apci2032_auto_attach(struct comedi_device *dev, ...@@ -320,9 +320,9 @@ static int apci2032_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[2]; s = &dev->subdevices[2];
if (dev->irq) { if (dev->irq) {
dev->read_subdev = s; dev->read_subdev = s;
s->type = COMEDI_SUBD_DI | SDF_CMD_READ; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
s->n_chan = 1; s->n_chan = 2;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = apci2032_int_insn_bits; s->insn_bits = apci2032_int_insn_bits;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment