Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dev->minor, devpriv->ioaddr);
for (i = 0; i < PCI20000_MODULES; i++) {
- s = dev->subdevices + i;
+ s = &dev->subdevices[i];
id = readb(devpriv->ioaddr + (i + 1) * PCI20000_OFFSET);
s->private = devpriv->subdev_private + i;
sdp = s->private;
}
/* initialize struct pci20xxx_private */
- pci20xxx_dio_init(dev, dev->subdevices + PCI20000_MODULES);
+ pci20xxx_dio_init(dev, &dev->subdevices[PCI20000_MODULES]);
return 1;
}