Commit d08d6cfe authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: range: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5818e709
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment