staging: comedi: ii_pci20kc: remove subdevice pointer math
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>
This commit is contained in:
parent
27f7f1002f
commit
35fcaeb87d
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue