From: H Hartley Sweeten Date: Thu, 6 Sep 2012 01:22:25 +0000 (-0700) Subject: staging: comedi: acl7225b: remove subdevice pointer math X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6e269d7cac312ebb1efc1adaf20e4a92abe24978;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: acl7225b: 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/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c index ddba5db1e2e1..28c7fd3a96b6 100644 --- a/drivers/staging/comedi/drivers/acl7225b.c +++ b/drivers/staging/comedi/drivers/acl7225b.c @@ -81,7 +81,7 @@ static int acl7225b_attach(struct comedi_device *dev, if (ret) return ret; - s = dev->subdevices + 0; + s = &dev->subdevices[0]; /* Relays outputs */ s->type = COMEDI_SUBD_DO; s->subdev_flags = SDF_WRITABLE; @@ -91,7 +91,7 @@ static int acl7225b_attach(struct comedi_device *dev, s->range_table = &range_digital; s->private = (void *)ACL7225_RIO_LO; - s = dev->subdevices + 1; + s = &dev->subdevices[1]; /* Relays status */ s->type = COMEDI_SUBD_DI; s->subdev_flags = SDF_READABLE; @@ -101,7 +101,7 @@ static int acl7225b_attach(struct comedi_device *dev, s->range_table = &range_digital; s->private = (void *)ACL7225_RIO_LO; - s = dev->subdevices + 2; + s = &dev->subdevices[2]; /* Isolated digital inputs */ s->type = COMEDI_SUBD_DI; s->subdev_flags = SDF_READABLE;