From: H Hartley Sweeten Date: Thu, 6 Sep 2012 01:21:53 +0000 (-0700) Subject: staging: comedi: 8255: remove subdevice pointer math X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5101b4d1877396d9b1ce5a6a6e91bb302289bf89;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: 8255: remove subdevice pointer math Convert the comedi_subdevice access from pointer math to array access. Signed-off-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c index 4c9977b8a5ae..e2506dd25305 100644 --- a/drivers/staging/comedi/drivers/8255.c +++ b/drivers/staging/comedi/drivers/8255.c @@ -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);