[PATCH 4/4] staging: comedi: addi_apci_1564: fix s->maxdata assignment in do subdevice init.

Chase Southwood
2014-07-11T04:03:35Z

s->maxdata for the do subdevice should be 1, however currently it is
being set to 0xffffffff. Fix this.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
This patch is at the end because I'm somewhat uncertain of its
correctness. Every other addi_apci_* driver with a digital output
subdevice sets s->maxdata to 1 so I'd be surprised if just this board
differed, but I'm not familiar enough with the hardware to verify that
myself. I'd appreciate a verification that this is a correct change.
Thanks!

drivers/staging/comedi/drivers/addi_apci_1564.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index f91aedd..1e25342 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -391,7 +391,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE;
s->n_chan = 32;
- s->maxdata = 0xffffffff;
+ s->maxdata = 1;
s->range_table = &range_digital;
s->insn_config = apci1564_do_config;
s->insn_bits = apci1564_do_insn_bits;
--
2.0.1