Skip to content

Commit

Permalink
staging: comedi: cb_pcidda: remove private data variable 'digitalio'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 25, 2012
1 parent dcf5e2b commit 08f082e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/staging/comedi/drivers/cb_pcidda.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand All @@ -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++) {
Expand Down

0 comments on commit 08f082e

Please sign in to comment.