From: H Hartley Sweeten Date: Tue, 13 Nov 2012 20:42:15 +0000 (-0700) Subject: staging: comedi: addi_apci_1516: remove devpriv->iobase usage X-Git-Tag: firefly_0821_release~3680^2~1519^2~414 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d330b1da10a2bd0f71c2aa7f9e209b8d06d45901;p=firefly-linux-kernel-4.4.55.git staging: comedi: addi_apci_1516: remove devpriv->iobase usage The iobase address stored in devpriv->iobase is also stored in dev->iobase. Use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c index 9aa8298f5e5e..0658fe9b45ed 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c @@ -75,9 +75,7 @@ static int apci1516_di_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; - - data[1] = inw(devpriv->iobase + APCI1516_DI_REG); + data[1] = inw(dev->iobase + APCI1516_DI_REG); return insn->n; } @@ -87,17 +85,15 @@ static int apci1516_do_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - - struct addi_private *devpriv = dev->private; unsigned int mask = data[0]; unsigned int bits = data[1]; - s->state = inw(devpriv->iobase + APCI1516_DO_REG); + s->state = inw(dev->iobase + APCI1516_DO_REG); if (mask) { s->state &= ~mask; s->state |= (bits & mask); - outw(s->state, devpriv->iobase + APCI1516_DO_REG); + outw(s->state, dev->iobase + APCI1516_DO_REG); } data[1] = s->state; diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index 6c61f3dc5cb9..dabf44c7360f 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -35,7 +35,7 @@ static int apci1516_reset(struct comedi_device *dev) if (!this_board->i_Timer) return 0; - outw(0x0, devpriv->iobase + APCI1516_DO_REG); + outw(0x0, dev->iobase + APCI1516_DO_REG); outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG); outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_LSB_REG); outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_MSB_REG); @@ -85,7 +85,6 @@ static int __devinit apci1516_auto_attach(struct comedi_device *dev, return ret; dev->iobase = pci_resource_start(pcidev, 1); - devpriv->iobase = dev->iobase; devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0); devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2); devpriv->i_IobaseReserved = pci_resource_start(pcidev, 3);