[PATCH 07/19] staging: comedi: cb_pcidda: remove private data variable 'digitalio'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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++) {
-- 
1.7.11

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux