diff options
author | Kristen Accardi <kristen.c.accardi@intel.com> | 2006-04-28 11:37:38 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 11:59:59 -0700 |
commit | a1e022b3aeacf633a6c8e8f0eb04d9c9e44b4fcd (patch) | |
tree | 55f95cedf7056a762caec8c61715bb0422c95f02 /drivers/pci | |
parent | 9f125d30487cea72542a84b4835c037163c7f3d5 (diff) | |
download | blackbird-op-linux-a1e022b3aeacf633a6c8e8f0eb04d9c9e44b4fcd.tar.gz blackbird-op-linux-a1e022b3aeacf633a6c8e8f0eb04d9c9e44b4fcd.zip |
[PATCH] PCI: don't enable device if already enabled
If a device is already enabled, don't bother reenabling it.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Acked-By: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index fde41cc14734..aa480370ef10 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -517,7 +517,12 @@ pci_enable_device_bars(struct pci_dev *dev, int bars) int pci_enable_device(struct pci_dev *dev) { - int err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1); + int err; + + if (dev->is_enabled) + return 0; + + err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1); if (err) return err; pci_fixup_device(pci_fixup_enable, dev); |