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

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: 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 13962d97
......@@ -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;
......
......@@ -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;
......
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