[PATCH 12/22] staging: comedi: addi_apci_16xx: remove devpriv->iobase usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The iobase address stored in devpriv->iobase is also stored in
dev->iobase. Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c | 12 ++++++------
 drivers/staging/comedi/drivers/addi_apci_16xx.c           |  1 -
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c
index ec39b6f..da4f03b 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 e87ae35..2784a8a 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;
-- 
1.8.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux