aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_glue.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-13 17:27:23 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-22 21:58:42 -0400
commitbe1c9de98d8904c75a5ab8b2a0d97bea0f7c07cc (patch)
tree43c1f3632a3b8be20cae5db77bdcd2f0852acdd7 /drivers/pci/hotplug/acpiphp_glue.c
parentb9eb179fe6d9acc11a54194d2df147e991f049aa (diff)
ACPI / PCI: Make bus registration and unregistration symmetric
Since acpi_pci_slot_enumerate() and acpiphp_enumerate_slots() can get the ACPI device handle they need from bus->bridge, it is not necessary to pass that handle to them as an argument. Drop the second argument of acpi_pci_slot_enumerate() and acpiphp_enumerate_slots(), rework them to obtain the ACPI handle from bus->bridge and make acpi_pci_add_bus() and acpi_pci_remove_bus() entirely symmetrical. Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 8bfad0dc29ab..a203ba529fef 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -1147,14 +1147,16 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type,
1147 * Create hotplug slots for the PCI bus. 1147 * Create hotplug slots for the PCI bus.
1148 * It should always return 0 to avoid skipping following notifiers. 1148 * It should always return 0 to avoid skipping following notifiers.
1149 */ 1149 */
1150void acpiphp_enumerate_slots(struct pci_bus *bus, acpi_handle handle) 1150void acpiphp_enumerate_slots(struct pci_bus *bus)
1151{ 1151{
1152 acpi_handle handle;
1152 struct acpiphp_bridge *bridge; 1153 struct acpiphp_bridge *bridge;
1153 1154
1154 if (acpiphp_disabled) 1155 if (acpiphp_disabled)
1155 return; 1156 return;
1156 1157
1157 if (detect_ejectable_slots(handle) <= 0) 1158 handle = ACPI_HANDLE(bus->bridge);
1159 if (!handle || detect_ejectable_slots(handle) <= 0)
1158 return; 1160 return;
1159 1161
1160 bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL); 1162 bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL);