提交 5101b4d1 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: 8255: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册