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>
This commit is contained in:
Rafael J. Wysocki
2013-01-19 01:27:35 +01:00
parent 5993c4670e
commit b8bd759acd
8 changed files with 32 additions and 42 deletions

View File

@@ -746,7 +746,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func)
dbg("acpi_bus_trim return %x\n", ret_val);
}
ret_val = acpi_bus_add(func->handle);
ret_val = acpi_bus_scan(func->handle);
if (!ret_val)
ret_val = acpi_bus_get_device(func->handle, &device);
@@ -1129,7 +1129,7 @@ static void handle_bridge_insertion(acpi_handle handle, u32 type)
return;
}
if (acpi_bus_add(handle)) {
if (acpi_bus_scan(handle)) {
err("cannot add bridge to acpi list\n");
return;
}