diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-04 00:48:57 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-05 01:28:06 +0100 |
commit | b8a62d540240387c7e97a69127cab3ab9cadc70a (patch) | |
tree | 8b3dc6fb26b1bbf20a75b6036eb5086b40c60be1 /drivers/pci/hotplug | |
parent | cc6254e00eb676dda6501655f8185aef7b761b4f (diff) | |
download | linux-b8a62d540240387c7e97a69127cab3ab9cadc70a.tar.gz linux-b8a62d540240387c7e97a69127cab3ab9cadc70a.tar.bz2 linux-b8a62d540240387c7e97a69127cab3ab9cadc70a.zip |
ACPI / hotplug / PCI: Use pci_device_is_present()
Make the ACPI-based PCI hotplug (ACPIPHP) code use
pci_device_is_present() for checking if devices are present instead
of open coding the same thing.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index f2f460cba5f7..2d51bf7e9fe0 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -689,12 +689,9 @@ static void trim_stale_devices(struct pci_dev *dev) alive = (ACPI_SUCCESS(status) && device_status_valid(sta)) || acpiphp_no_hotplug(adev); } - if (!alive) { - u32 v; + if (!alive) + alive = pci_device_is_present(dev); - /* Check if the device responds. */ - alive = pci_bus_read_dev_vendor_id(dev->bus, dev->devfn, &v, 0); - } if (!alive) { pci_stop_and_remove_bus_device(dev); if (adev) |