Skip to content

Commit

Permalink
staging: comedi: hwdrv_apci3120: remove subdevice pointer math
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 4943374 commit ca0fcee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit ca0fcee

Please sign in to comment.