From 5b1e9d359adfb7b9d420528d3895322435c6b0ee Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 3 Jul 2012 11:27:51 +0100 Subject: [PATCH] s626: DIO subdevice 2 should have 16 channels. Subdevice 2 (which is a DIO subdevice) has the wrong number of channels, 48 defined by the S626_DIO_CHANNELS macro. That is the total number of DIO channels to be split over 3 subdevices (subdevices 2, 3, 4 with 16 channels each). Fix the number of channels for subdevice 2. Spotted by H Hartley Sweeten in the "staging" sources. Signed-off-by: Ian Abbott --- comedi/drivers/s626.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comedi/drivers/s626.c b/comedi/drivers/s626.c index fc6cd617..14057ba1 100644 --- a/comedi/drivers/s626.c +++ b/comedi/drivers/s626.c @@ -648,7 +648,7 @@ static int s626_attach(comedi_device * dev, comedi_devconfig * it) /* digital I/O subdevice */ s->type = COMEDI_SUBD_DIO; s->subdev_flags = SDF_WRITABLE | SDF_READABLE; - s->n_chan = S626_DIO_CHANNELS; + s->n_chan = 16; s->maxdata = 1; s->io_bits = 0xffff; s->private = &dio_private_A; -- 2.26.2