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

index 291ce7c1bdb198fd69131933bc57ae1c7dfea9b1..28af8f6873ebcff10721a7391a6d02f9411a63bc 100644 (file)
@@ -195,7 +195,7 @@ static int pcmda12_attach(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       s = dev->subdevices;
+       s = &dev->subdevices[0];
        s->private = NULL;
        s->maxdata = (0x1 << BITS) - 1;
        s->range_table = &pcmda12_ranges;