Skip to content

Commit

Permalink
staging: comedi: addi_apci_16xx: remove devpriv->iobase usage
Browse files Browse the repository at this point in the history
The iobase address stored in devpriv->iobase is also stored in
dev->iobase. Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 18, 2013
1 parent 13962d9 commit 6b9633b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand All @@ -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 */
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/comedi/drivers/addi_apci_16xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b9633b

Please sign in to comment.