s626: DIO subdevice 2 should have 16 channels.
authorIan Abbott <abbotti@mev.co.uk>
Tue, 3 Jul 2012 10:27:51 +0000 (11:27 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 3 Jul 2012 10:27:51 +0000 (11:27 +0100)
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 <abbotti@mev.co.uk>
comedi/drivers/s626.c

index fc6cd617d3b80677c32bbc7a3c97ce952a227100..14057ba18da6aa4e1b6210a1e32c96dbdfd8d0fa 100644 (file)
@@ -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;