From: Ian Abbott Date: Tue, 3 Jul 2012 10:27:51 +0000 (+0100) Subject: s626: DIO subdevice 2 should have 16 channels. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5b1e9d359adfb7b9d420528d3895322435c6b0ee;p=comedi.git 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 --- 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;