staging: comedi: cb_pcidio: 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:
H Hartley Sweeten 2012-09-05 18:32:42 -07:00 committed by Greg Kroah-Hartman
parent 82ec595aa0
commit fbe09e33f5

View file

@ -119,7 +119,7 @@ static int pcidio_attach_pci(struct comedi_device *dev,
return ret; return ret;
for (i = 0; i < board->n_8255; i++) { for (i = 0; i < board->n_8255; i++) {
s = dev->subdevices + i; s = &dev->subdevices[i];
ret = subdev_8255_init(dev, s, NULL, dev->iobase + i * 4); ret = subdev_8255_init(dev, s, NULL, dev->iobase + i * 4);
if (ret) if (ret)
return ret; return ret;
@ -140,7 +140,7 @@ static void pcidio_detach(struct comedi_device *dev)
if (dev->subdevices) { if (dev->subdevices) {
for (i = 0; i < board->n_8255; i++) { for (i = 0; i < board->n_8255; i++) {
s = dev->subdevices + i; s = &dev->subdevices[i];
subdev_8255_cleanup(dev, s); subdev_8255_cleanup(dev, s);
} }
} }