From 08f082ed78eb2ece4438c7cd23cf18166e3cce4b Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 24 Oct 2012 16:30:21 -0700 Subject: [PATCH] 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidda.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c index 6e504dd..8feaa31 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++) { -- 2.7.4