Commit 5101b4d1 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: 8255: 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 5e4c58ce
...@@ -403,7 +403,7 @@ static int dev_8255_attach(struct comedi_device *dev, ...@@ -403,7 +403,7 @@ static int dev_8255_attach(struct comedi_device *dev,
return ret; return ret;
for (i = 0; i < dev->n_subdevices; i++) { for (i = 0; i < dev->n_subdevices; i++) {
s = dev->subdevices + i; s = &dev->subdevices[i];
iobase = it->options[i]; iobase = it->options[i];
if (!request_region(iobase, _8255_SIZE, "8255")) { if (!request_region(iobase, _8255_SIZE, "8255")) {
...@@ -429,7 +429,7 @@ static void dev_8255_detach(struct comedi_device *dev) ...@@ -429,7 +429,7 @@ static void dev_8255_detach(struct comedi_device *dev)
int i; int i;
for (i = 0; i < dev->n_subdevices; i++) { for (i = 0; i < dev->n_subdevices; i++) {
s = dev->subdevices + i; s = &dev->subdevices[i];
if (s->type != COMEDI_SUBD_UNUSED) { if (s->type != COMEDI_SUBD_UNUSED) {
spriv = s->private; spriv = s->private;
release_region(spriv->iobase, _8255_SIZE); release_region(spriv->iobase, _8255_SIZE);
......
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