summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-05 18:59:44 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 20:06:32 -0700
commitd08d6cfe3b594b797e1204891613d1cdf70fb0c7 (patch)
tree894d1a66fde5d80a8bbb4ca65edfc812954989ef
parent5818e7090bb6eacb886bd2f7fc3df06e23047b29 (diff)
downloadblackbird-op-linux-d08d6cfe3b594b797e1204891613d1cdf70fb0c7.tar.gz
blackbird-op-linux-d08d6cfe3b594b797e1204891613d1cdf70fb0c7.zip
staging: comedi: range: 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>
-rw-r--r--drivers/staging/comedi/range.c2
1 files changed, 1 insertions, 1 deletions
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) {
OpenPOWER on IntegriCloud