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

index 83016b411851f0ea02eb90721cbf3ae4754b7f54..7355860bce262c57d0034d0052884dfdc37aca70 100644 (file)
@@ -121,7 +121,7 @@ static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                return ret;
 
        /* DAQCard-700 dio */
-       s = dev->subdevices + 0;
+       s = &dev->subdevices[0];
        s->type         = COMEDI_SUBD_DIO;
        s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
        s->n_chan       = 16;