This member of the private data is the same as the comedi_device 'iobase'. Remove the private data member and use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 28 +++++++++------------- drivers/staging/comedi/drivers/addi_apci_1500.c | 4 +--- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c index c593931..11e3d84 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c @@ -121,35 +121,29 @@ static int i_TimerCounter1Enabled, i_TimerCounter2Enabled, static unsigned int z8536_read(struct comedi_device *dev, unsigned int reg) { - struct apci1500_private *devpriv = dev->private; - - outb(reg, devpriv->iobase + APCI1500_Z8536_CTRL_REG); - return inb(devpriv->iobase + APCI1500_Z8536_CTRL_REG); + outb(reg, dev->iobase + APCI1500_Z8536_CTRL_REG); + return inb(dev->iobase + APCI1500_Z8536_CTRL_REG); } static void z8536_write(struct comedi_device *dev, unsigned int val, unsigned int reg) { - struct apci1500_private *devpriv = dev->private; - - outb(reg, devpriv->iobase + APCI1500_Z8536_CTRL_REG); - outb(val, devpriv->iobase + APCI1500_Z8536_CTRL_REG); + outb(reg, dev->iobase + APCI1500_Z8536_CTRL_REG); + outb(val, dev->iobase + APCI1500_Z8536_CTRL_REG); } static void z8536_reset(struct comedi_device *dev) { - struct apci1500_private *devpriv = dev->private; - /* * Even if the state of the Z8536 is not known, the following * sequence will reset it and put it in State 0. */ - inb(devpriv->iobase + APCI1500_Z8536_CTRL_REG); - outb(0, devpriv->iobase + APCI1500_Z8536_CTRL_REG); - inb(devpriv->iobase + APCI1500_Z8536_CTRL_REG); - outb(0, devpriv->iobase + APCI1500_Z8536_CTRL_REG); - outb(1, devpriv->iobase + APCI1500_Z8536_CTRL_REG); - outb(0, devpriv->iobase + APCI1500_Z8536_CTRL_REG); + inb(dev->iobase + APCI1500_Z8536_CTRL_REG); + outb(0, dev->iobase + APCI1500_Z8536_CTRL_REG); + inb(dev->iobase + APCI1500_Z8536_CTRL_REG); + outb(0, dev->iobase + APCI1500_Z8536_CTRL_REG); + outb(1, dev->iobase + APCI1500_Z8536_CTRL_REG); + outb(0, dev->iobase + APCI1500_Z8536_CTRL_REG); z8536_write(dev, 0xf4, APCI1500_RW_MASTER_CONFIGURATION_CONTROL); @@ -1529,7 +1523,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) z8536_write(dev, i_RegValue, APCI1500_RW_PORT_B_COMMAND_AND_STATUS); /* Reads port B */ - i_RegValue = inb(devpriv->iobase + + i_RegValue = inb(dev->iobase + APCI1500_Z8536_PORTB_REG); i_RegValue = i_RegValue & 0xC0; diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index dc7ecde..a142e48 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -8,7 +8,7 @@ #include "amcc_s5933.h" /* -* PCI Bar 1 Register map (devpriv->iobase) +* PCI Bar 1 Register map (dev->iobase) */ #define APCI1500_Z8536_PORTC_REG 0x00 #define APCI1500_Z8536_PORTB_REG 0x01 @@ -16,7 +16,6 @@ #define APCI1500_Z8536_CTRL_REG 0x03 struct apci1500_private { - int iobase; int i_IobaseAmcc; int i_IobaseAddon; int i_IobaseReserved; @@ -43,7 +42,6 @@ static int apci1500_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); -- 2.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel