From: H Hartley Sweeten Date: Fri, 18 Jan 2013 17:45:34 +0000 (-0700) Subject: staging: comedi: addi_apci_16xx: remove devpriv->iobase usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6b9633b4c70a405fe0ffad6f5bbb59f0ad1eb5d9;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: addi_apci_16xx: 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_apci16xx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c index ec39b6f40be6..da4f03ba8fae 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c @@ -179,7 +179,7 @@ static int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev, outl(devpriv-> ul_TTLPortConfiguration[b_Cpt / 4], - devpriv->iobase + 32 + b_Cpt); + dev->iobase + 32 + b_Cpt); } } } @@ -295,7 +295,7 @@ static int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev, /* Get the digital inpu status */ dw_Status = - inl(devpriv->iobase + 8 + ((b_SelectedPort / 4) * 4)); + inl(dev->iobase + 8 + ((b_SelectedPort / 4) * 4)); dw_Status = (dw_Status >> (8 * (b_SelectedPort % 4))) & 0xFF; /* Save the port value */ @@ -362,7 +362,7 @@ static int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev, for (b_Cpt = 0; b_Cpt < b_NumberOfPort; b_Cpt++) { /* Read the 32-Bit port */ pls_ReadData[b_Cpt] = - inl(devpriv->iobase + 8 + + inl(dev->iobase + 8 + (b_Cpt * 4)); /* Mask all channels used als outputs */ @@ -376,7 +376,7 @@ static int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev, for (b_Cpt = 0; b_Cpt < b_NumberOfPort; b_Cpt++) { /* Read the 32-Bit port */ pls_ReadData[b_Cpt] = - inl(devpriv->iobase + 20 + + inl(dev->iobase + 20 + (b_Cpt * 4)); /* Mask all channels used als outputs */ @@ -508,7 +508,7 @@ static int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev, if (i_ReturnValue >= 0) { /* Get the digital output state */ dw_Status = - inl(devpriv->iobase + 20 + ((b_SelectedPort / 4) * 4)); + inl(dev->iobase + 20 + ((b_SelectedPort / 4) * 4)); /* Test if output memory not used */ if (devpriv->b_OutputMemoryStatus == ADDIDATA_DISABLE) { @@ -549,7 +549,7 @@ static int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev, } outl(dw_Status, - devpriv->iobase + 20 + ((b_SelectedPort / 4) * 4)); + dev->iobase + 20 + ((b_SelectedPort / 4) * 4)); } return i_ReturnValue; diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c index e87ae3560ba9..2784a8a3fb7e 100644 --- a/drivers/staging/comedi/drivers/addi_apci_16xx.c +++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c @@ -73,7 +73,6 @@ static int apci16xx_auto_attach(struct comedi_device *dev, return ret; dev->iobase = pci_resource_start(pcidev, 0); - devpriv->iobase = dev->iobase; /* Initialize parameters that can be overridden in EEPROM */ devpriv->s_EeParameters.i_NbrAiChannel = this_board->i_NbrAiChannel;