From: H Hartley Sweeten Date: Thu, 6 Sep 2012 01:59:44 +0000 (-0700) Subject: staging: comedi: range: remove subdevice pointer math X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d08d6cfe3b594b797e1204891613d1cdf70fb0c7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: range: 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/range.c b/drivers/staging/comedi/range.c index 5a6b6df07513..59ff0cf73381 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/comedi/range.c @@ -68,7 +68,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev, return -EINVAL; if (subd >= dev->n_subdevices) return -EINVAL; - s = dev->subdevices + subd; + s = &dev->subdevices[subd]; if (s->range_table) { lr = s->range_table; } else if (s->range_table_list) {