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

index ffe390c6da83670a575950b269c8baaad2d9dc3a..d61fce081c1489c109f5dd44985ee4d31acb5071 100644 (file)
@@ -1451,7 +1451,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
        unsigned short us_TmpValue;
        unsigned char b_DummyRead;
 
-       struct comedi_subdevice *s = dev->subdevices + 0;
+       struct comedi_subdevice *s = &dev->subdevices[0];
        ui_Check = 1;
 
        int_daq = inw(dev->iobase + APCI3120_RD_STATUS) & 0xf000;       /*  get IRQ reasons */
@@ -1656,7 +1656,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
 int i_APCI3120_InterruptHandleEos(struct comedi_device *dev)
 {
        int n_chan, i;
-       struct comedi_subdevice *s = dev->subdevices + 0;
+       struct comedi_subdevice *s = &dev->subdevices[0];
        int err = 1;
 
        n_chan = devpriv->ui_AiNbrofChannels;
@@ -1698,7 +1698,7 @@ int i_APCI3120_InterruptHandleEos(struct comedi_device *dev)
 void v_APCI3120_InterruptDma(int irq, void *d)
 {
        struct comedi_device *dev = d;
-       struct comedi_subdevice *s = dev->subdevices + 0;
+       struct comedi_subdevice *s = &dev->subdevices[0];
        unsigned int next_dma_buf, samplesinbuf;
        unsigned long low_word, high_word, var;
 
This page took 0.027194 seconds and 5 git commands to generate.