staging: comedi: cb_pcidda: remove private data variable 'digitalio'
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 24 Oct 2012 23:30:21 +0000 (16:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Oct 2012 02:35:49 +0000 (19:35 -0700)
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>
drivers/staging/comedi/drivers/cb_pcidda.c

index 6e504ddde862a463a3e4b4f7466c820b034edcc6..8feaa31b1be9e933dbe708b46a32f72505a04a1c 100644 (file)
@@ -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++) {