diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-18 21:50:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-19 04:41:45 -0400 |
commit | 0352b932be274d0d67b02f93fe94e30e57265f85 (patch) | |
tree | f906ae11481aad3030341a8be31fd63ca3fd089a | |
parent | bdf7c9dc10912dbad3a5052ee824546535e0b4c1 (diff) |
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>
-rw-r--r-- | drivers/staging/comedi/drivers/daqboard2000.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 69bc0e5d8eed..d13c8c5822bf 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, | |||
696 | const struct daq200_boardtype *board; | 696 | const struct daq200_boardtype *board; |
697 | struct daqboard2000_private *devpriv; | 697 | struct daqboard2000_private *devpriv; |
698 | struct comedi_subdevice *s; | 698 | struct comedi_subdevice *s; |
699 | resource_size_t pci_base; | ||
700 | int result; | 699 | int result; |
701 | 700 | ||
702 | comedi_set_hw_dev(dev, &pcidev->dev); | 701 | comedi_set_hw_dev(dev, &pcidev->dev); |
@@ -717,10 +716,10 @@ static int daqboard2000_attach_pci(struct comedi_device *dev, | |||
717 | return result; | 716 | return result; |
718 | dev->iobase = 1; /* the "detach" needs this */ | 717 | dev->iobase = 1; /* the "detach" needs this */ |
719 | 718 | ||
720 | pci_base = pci_resource_start(pcidev, 0); | 719 | devpriv->plx = ioremap(pci_resource_start(pcidev, 0), |
721 | devpriv->plx = ioremap(pci_base, pci_resource_len(pcidev, 0)); | 720 | pci_resource_len(pcidev, 0)); |
722 | pci_base = pci_resource_start(pcidev, 2); | 721 | devpriv->daq = ioremap(pci_resource_start(pcidev, 2), |
723 | devpriv->daq = ioremap(pci_base, pci_resource_len(pcidev, 2)); | 722 | pci_resource_len(pcidev, 2)); |
724 | if (!devpriv->plx || !devpriv->daq) | 723 | if (!devpriv->plx || !devpriv->daq) |
725 | return -ENOMEM; | 724 | return -ENOMEM; |
726 | 725 | ||