forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
9f125d3048
commit
a1e022b3ae
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user