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

From: Chase Southwood
Date: Fri Jul 11 2014 - 00:03:39 EST


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@xxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/