mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
staging: comedi: 8255: 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:
parent
5e4c58ce65
commit
5101b4d187
1 changed files with 2 additions and 2 deletions
|
|
@ -403,7 +403,7 @@ static int dev_8255_attach(struct comedi_device *dev,
|
|||
return ret;
|
||||
|
||||
for (i = 0; i < dev->n_subdevices; i++) {
|
||||
s = dev->subdevices + i;
|
||||
s = &dev->subdevices[i];
|
||||
iobase = it->options[i];
|
||||
|
||||
if (!request_region(iobase, _8255_SIZE, "8255")) {
|
||||
|
|
@ -429,7 +429,7 @@ static void dev_8255_detach(struct comedi_device *dev)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < dev->n_subdevices; i++) {
|
||||
s = dev->subdevices + i;
|
||||
s = &dev->subdevices[i];
|
||||
if (s->type != COMEDI_SUBD_UNUSED) {
|
||||
spriv = s->private;
|
||||
release_region(spriv->iobase, _8255_SIZE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue