Skip to content

Commit

Permalink
staging: comedi: ii_pci20kc: 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 27f7f10 commit 35fcaeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/ii_pci20kc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 35fcaeb

Please sign in to comment.