summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-10-24 16:30:21 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-24 19:35:49 -0700
commit08f082ed78eb2ece4438c7cd23cf18166e3cce4b (patch)
treea41a9263897aa0e0ea82cc4d38b768fa69126272
parentdcf5e2b39aaec76e7771e57dc469f538386fe593 (diff)
staging: comedi: cb_pcidda: remove private data variable 'digitalio'
The private data variable 'digitalio' is only used to hold the PCI base address for the 8255 devices on the board. This value is then passed to subdev_8255_init() and stored in it's own private data. There is no need to keep the value in the private data for the board. 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>
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidda.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 6e504ddde862..8feaa31b1be9 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -204,8 +204,6 @@ static const struct cb_pcidda_board cb_pcidda_boards[] = {
};
struct cb_pcidda_private {
- unsigned long digitalio;
-
/* bits last written to da calibration register 1 */
unsigned int dac_cal1_bits;
/* current range settings for output channels */
@@ -482,6 +480,7 @@ static int cb_pcidda_attach_pci(struct comedi_device *dev,
const struct cb_pcidda_board *thisboard;
struct cb_pcidda_private *devpriv;
struct comedi_subdevice *s;
+ unsigned long iobase_8255;
int index;
int ret;
@@ -500,8 +499,7 @@ static int cb_pcidda_attach_pci(struct comedi_device *dev,
if (ret)
return ret;
dev->iobase = pci_resource_start(pcidev, 3);
-
- devpriv->digitalio = pci_resource_start(pcidev, 2);
+ iobase_8255 = pci_resource_start(pcidev, 2);
if (thisboard->status == 2)
printk
@@ -524,9 +522,9 @@ static int cb_pcidda_attach_pci(struct comedi_device *dev,
/* two 8255 digital io subdevices */
s = &dev->subdevices[1];
- subdev_8255_init(dev, s, NULL, devpriv->digitalio);
+ subdev_8255_init(dev, s, NULL, iobase_8255);
s = &dev->subdevices[2];
- subdev_8255_init(dev, s, NULL, devpriv->digitalio + PORT2A);
+ subdev_8255_init(dev, s, NULL, iobase_8255 + PORT2A);
dev_dbg(dev->class_dev, "eeprom:\n");
for (index = 0; index < EEPROM_SIZE; index++) {