comedi vmk80xx: Digitial I/O should have a maxdata of 1
authorJ. Ali Harlow <ali@avrc.city.ac.uk>
Wed, 18 May 2011 18:18:52 +0000 (19:18 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 18 May 2011 21:32:05 +0000 (14:32 -0700)
Digitial input and output sub-devices were reporting a maxdata of
0x1F and 0xFF respectively. They should both be 1.

Signed-off-by: J. Ali Harlow <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/vmk80xx.c

index 5d83bb667144c38b9702e58e63bb8a917409d6c5..01cfb7695f7c695d8d7777ea831e2aa4a3060233 100644 (file)
@@ -1138,7 +1138,7 @@ static int vmk80xx_attach(struct comedi_device *cdev,
        s->type = COMEDI_SUBD_DI;
        s->subdev_flags = SDF_READABLE | SDF_GROUND;
        s->n_chan = dev->board.di_chans;
-       s->maxdata = (1 << dev->board.di_bits) - 1;
+       s->maxdata = 1;
        s->insn_read = vmk80xx_di_rinsn;
 
        /* Digital output subdevice */
@@ -1146,7 +1146,7 @@ static int vmk80xx_attach(struct comedi_device *cdev,
        s->type = COMEDI_SUBD_DO;
        s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
        s->n_chan = dev->board.do_chans;
-       s->maxdata = (1 << dev->board.do_bits) - 1;
+       s->maxdata = 1;
        s->insn_write = vmk80xx_do_winsn;
 
        if (dev->board.model == VMK8061_MODEL) {