2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 10:13:57 +08:00

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>
This commit is contained in:
H Hartley Sweeten 2012-09-05 18:59:44 -07:00 committed by Greg Kroah-Hartman
parent 5818e7090b
commit d08d6cfe3b

View File

@ -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) {