diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-18 19:27:35 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-18 19:27:35 -0500 |
commit | b8bd759acd05281abf88cddef30c57313c109697 (patch) | |
tree | 9ccbf63ea93bd2c41b8060987b8e670176090cbf /drivers/pci | |
parent | 5993c4670ea2453ef5abb45b312f150e994e6eb9 (diff) |
ACPI / scan: Drop acpi_bus_add() and use acpi_bus_scan() instead
The only difference between acpi_bus_scan() and acpi_bus_add() is the
invocation of acpi_update_all_gpes() in the latter which in fact is
unnecessary, because acpi_update_all_gpes() has already been called
by acpi_scan_init() and the way it is implemented guarantees the next
invocations of it to do nothing.
For this reason, drop acpi_bus_add() and make all its callers use
acpi_bus_scan() directly instead of it. Additionally, rearrange the
code in acpi_scan_init() slightly to improve the visibility of the
acpi_update_all_gpes() call in there.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/sgi_hotplug.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 22006f2d9dd5..9e2b1f6dbe41 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -746,7 +746,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func) | |||
746 | dbg("acpi_bus_trim return %x\n", ret_val); | 746 | dbg("acpi_bus_trim return %x\n", ret_val); |
747 | } | 747 | } |
748 | 748 | ||
749 | ret_val = acpi_bus_add(func->handle); | 749 | ret_val = acpi_bus_scan(func->handle); |
750 | if (!ret_val) | 750 | if (!ret_val) |
751 | ret_val = acpi_bus_get_device(func->handle, &device); | 751 | ret_val = acpi_bus_get_device(func->handle, &device); |
752 | 752 | ||
@@ -1129,7 +1129,7 @@ static void handle_bridge_insertion(acpi_handle handle, u32 type) | |||
1129 | return; | 1129 | return; |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | if (acpi_bus_add(handle)) { | 1132 | if (acpi_bus_scan(handle)) { |
1133 | err("cannot add bridge to acpi list\n"); | 1133 | err("cannot add bridge to acpi list\n"); |
1134 | return; | 1134 | return; |
1135 | } | 1135 | } |
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index 2e006ee5738b..ae606b3e991e 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -447,9 +447,9 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) | |||
447 | if (ACPI_SUCCESS(ret) && | 447 | if (ACPI_SUCCESS(ret) && |
448 | (adr>>16) == (slot->device_num + 1)) { | 448 | (adr>>16) == (slot->device_num + 1)) { |
449 | 449 | ||
450 | ret = acpi_bus_add(chandle); | 450 | ret = acpi_bus_scan(chandle); |
451 | if (ACPI_FAILURE(ret)) { | 451 | if (ACPI_FAILURE(ret)) { |
452 | printk(KERN_ERR "%s: acpi_bus_add " | 452 | printk(KERN_ERR "%s: acpi_bus_scan " |
453 | "failed (0x%x) for slot %d " | 453 | "failed (0x%x) for slot %d " |
454 | "func %d\n", __func__, | 454 | "func %d\n", __func__, |
455 | ret, (int)(adr>>16), | 455 | ret, (int)(adr>>16), |