Commit d330b1da authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 82c2bc7f
...@@ -75,9 +75,7 @@ static int apci1516_di_insn_bits(struct comedi_device *dev, ...@@ -75,9 +75,7 @@ static int apci1516_di_insn_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; data[1] = inw(dev->iobase + APCI1516_DI_REG);
data[1] = inw(devpriv->iobase + APCI1516_DI_REG);
return insn->n; return insn->n;
} }
...@@ -87,17 +85,15 @@ static int apci1516_do_insn_bits(struct comedi_device *dev, ...@@ -87,17 +85,15 @@ static int apci1516_do_insn_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private;
unsigned int mask = data[0]; unsigned int mask = data[0];
unsigned int bits = data[1]; unsigned int bits = data[1];
s->state = inw(devpriv->iobase + APCI1516_DO_REG); s->state = inw(dev->iobase + APCI1516_DO_REG);
if (mask) { if (mask) {
s->state &= ~mask; s->state &= ~mask;
s->state |= (bits & 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; data[1] = s->state;
......
...@@ -35,7 +35,7 @@ static int apci1516_reset(struct comedi_device *dev) ...@@ -35,7 +35,7 @@ static int apci1516_reset(struct comedi_device *dev)
if (!this_board->i_Timer) if (!this_board->i_Timer)
return 0; 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_CTRL_REG);
outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_LSB_REG); outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_LSB_REG);
outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_MSB_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, ...@@ -85,7 +85,6 @@ static int __devinit apci1516_auto_attach(struct comedi_device *dev,
return ret; return ret;
dev->iobase = pci_resource_start(pcidev, 1); dev->iobase = pci_resource_start(pcidev, 1);
devpriv->iobase = dev->iobase;
devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0); devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2); devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
devpriv->i_IobaseReserved = pci_resource_start(pcidev, 3); devpriv->i_IobaseReserved = pci_resource_start(pcidev, 3);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment