diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-01-21 16:20:50 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-25 16:53:48 -0500 |
commit | d59f53bc9bd80ee62072dea590fc623c67cb84a8 (patch) | |
tree | a3a0cc477ebee058882365048690fba057dea014 /drivers/pci/hotplug/acpiphp_glue.c | |
parent | 121b090e7d4063b65f40c267ef0fb34fb278dfdf (diff) |
PCI: acpiphp: Keep driver loaded even if no slots found
Could have root bus hot-added later and there may be slots that need
acpiphp.
The result returned by acpiphp_get_num_slots() is meaningless, because
the bridge the slots are under may be added after this function has been
called, so drop acpiphp_get_num_slots() and the code using it.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index c4a6301009f2..bd784ff4a244 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -1416,28 +1416,6 @@ void acpiphp_glue_exit(void) | |||
1416 | acpi_pci_unregister_driver(&acpi_pci_hp_driver); | 1416 | acpi_pci_unregister_driver(&acpi_pci_hp_driver); |
1417 | } | 1417 | } |
1418 | 1418 | ||
1419 | |||
1420 | /** | ||
1421 | * acpiphp_get_num_slots - count number of slots in a system | ||
1422 | */ | ||
1423 | int __init acpiphp_get_num_slots(void) | ||
1424 | { | ||
1425 | struct acpiphp_bridge *bridge; | ||
1426 | int num_slots = 0; | ||
1427 | |||
1428 | list_for_each_entry(bridge, &bridge_list, list) { | ||
1429 | dbg("Bus %04x:%02x has %d slot%s\n", | ||
1430 | pci_domain_nr(bridge->pci_bus), | ||
1431 | bridge->pci_bus->number, bridge->nr_slots, | ||
1432 | bridge->nr_slots == 1 ? "" : "s"); | ||
1433 | num_slots += bridge->nr_slots; | ||
1434 | } | ||
1435 | |||
1436 | dbg("Total %d slots\n", num_slots); | ||
1437 | return num_slots; | ||
1438 | } | ||
1439 | |||
1440 | |||
1441 | /** | 1419 | /** |
1442 | * acpiphp_enable_slot - power on slot | 1420 | * acpiphp_enable_slot - power on slot |
1443 | * @slot: ACPI PHP slot | 1421 | * @slot: ACPI PHP slot |