staging: comedi: s626: fix the number of dio channels
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 2 Jul 2012 21:26:24 +0000 (14:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 22:56:14 +0000 (15:56 -0700)
The first digital i/o subdevice has its n_chan set to S626_DIO_CHANNELS
which is defined as 48. This is actually the total number of channels
provided by all three digital i/o subdevices. Each subdevice only has
16 channels.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/s626.c

index bef9649960b840bafc882c9f9be03556b01b087f..f90578e5e72758fc079d0b38d3c17a4452fd7e03 100644 (file)
@@ -2636,7 +2636,7 @@ static int s626_attach(struct comedi_device *dev, struct 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;