Skip to content

Commit

Permalink
staging: comedi: cb_pcidio: remove subdevice pointer math
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 82ec595 commit fbe09e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/cb_pcidio.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static int pcidio_attach_pci(struct comedi_device *dev,
return ret;

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);
if (ret)
return ret;
Expand All @@ -140,7 +140,7 @@ static void pcidio_detach(struct comedi_device *dev)

if (dev->subdevices) {
for (i = 0; i < board->n_8255; i++) {
s = dev->subdevices + i;
s = &dev->subdevices[i];
subdev_8255_cleanup(dev, s);
}
}
Expand Down

0 comments on commit fbe09e3

Please sign in to comment.