summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-19 01:50:23 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-19 08:41:45 (GMT)
commit0352b932be274d0d67b02f93fe94e30e57265f85 (patch)
treef906ae11481aad3030341a8be31fd63ca3fd089a /drivers
parentbdf7c9dc10912dbad3a5052ee824546535e0b4c1 (diff)
downloadlinux-fsl-qoriq-0352b932be274d0d67b02f93fe94e30e57265f85.tar.xz
staging: comedi: daqboard2000: remove local variable in daqboard2000_attach_pci()
The 'pci_base' variable is only used to hold the pci_resource_start() value used to ioremap the pci bars. Remove the local variable and just use pci_resource_start() directly in the ioremap. 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/daqboard2000.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 69bc0e5..d13c8c5 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -696,7 +696,6 @@ static int daqboard2000_attach_pci(struct comedi_device *dev,
const struct daq200_boardtype *board;
struct daqboard2000_private *devpriv;
struct comedi_subdevice *s;
- resource_size_t pci_base;
int result;
comedi_set_hw_dev(dev, &pcidev->dev);
@@ -717,10 +716,10 @@ static int daqboard2000_attach_pci(struct comedi_device *dev,
return result;
dev->iobase = 1; /* the "detach" needs this */
- pci_base = pci_resource_start(pcidev, 0);
- devpriv->plx = ioremap(pci_base, pci_resource_len(pcidev, 0));
- pci_base = pci_resource_start(pcidev, 2);
- devpriv->daq = ioremap(pci_base, pci_resource_len(pcidev, 2));
+ devpriv->plx = ioremap(pci_resource_start(pcidev, 0),
+ pci_resource_len(pcidev, 0));
+ devpriv->daq = ioremap(pci_resource_start(pcidev, 2),
+ pci_resource_len(pcidev, 2));
if (!devpriv->plx || !devpriv->daq)
return -ENOMEM;