staging: comedi: gsc_hpdi: remove subdevice pointer math
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 6 Sep 2012 01:43:20 +0000 (18:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Sep 2012 03:06:27 +0000 (20:06 -0700)
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>
drivers/staging/comedi/drivers/gsc_hpdi.c

index 79f580841dee3e68dddcbccf8eaa0236f3444d12..5d3fa711a5156a04b64576334b9223f2bcb8f66d 100644 (file)
@@ -436,7 +436,7 @@ static int setup_subdevices(struct comedi_device *dev)
        if (ret)
                return ret;
 
-       s = dev->subdevices + 0;
+       s = &dev->subdevices[0];
        /* analog input subdevice */
        dev->read_subdev = s;
 /*     dev->write_subdev = s; */