Skip to contentSkip to conversation

staging: comedi: s626: fix the number of dio channels

PATCH New H Hartley Sweeten 1 participant 1 message Jul 2, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: comedi: s626: fix the number of dio channels

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.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/s626.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/s626.c +1 -1
index bef9649..f90578e 100644
@@ -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;
Signature · 1 line
1.7.11