Commit 35fcaeb8 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ii_pci20kc: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 27f7f100
......@@ -224,7 +224,7 @@ static int pci20xxx_attach(struct comedi_device *dev,
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;
......@@ -259,7 +259,7 @@ static int pci20xxx_attach(struct comedi_device *dev,
}
/* initialize struct pci20xxx_private */
pci20xxx_dio_init(dev, dev->subdevices + PCI20000_MODULES);
pci20xxx_dio_init(dev, &dev->subdevices[PCI20000_MODULES]);
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment