]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ke_counter: remove subdevice pointer math
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 6 Sep 2012 01:44:44 +0000 (18:44 -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/ke_counter.c

index a2d0bb43631c68d618117d62de0d2d1aa62e2112..e867b720f666697f44e78450e1550afdd682e4e6 100644 (file)
@@ -145,7 +145,7 @@ static int cnt_attach_pci(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       s = dev->subdevices + 0;
+       s = &dev->subdevices[0];
        dev->read_subdev = s;
 
        s->type = COMEDI_SUBD_COUNTER;