From: Rafael J. Wysocki Date: Tue, 15 Jan 2013 12:24:02 +0000 (+0100) Subject: ACPI / scan: Change the implementation of acpi_bus_trim() X-Git-Tag: v3.9-rc1~146^2~12^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cecdb193c8d91a42d9489d00618cc3dfff92e55a;p=pandora-kernel.git ACPI / scan: Change the implementation of acpi_bus_trim() The current acpi_bus_trim() implementation is not really straightforward and may be simplified significantly by using acpi_walk_namespace() with acpi_bus_remove() as a post-order callback. Observe that acpi_bus_remove(), as called by acpi_bus_trim(), cannot actually fail, because its first argument is guaranteed not to be NULL thanks to the acpi_bus_get_device() check in acpi_bus_trim(), so simply move the acpi_bus_get_device() check to acpi_bus_remove() and use acpi_walk_namespace() to execute it for every device under start->handle as a post-order callback. The, run it directly for start->handle itself. Signed-off-by: Rafael J. Wysocki Acked-by: Toshi Kani Acked-by: Yinghai Lu Acked-by: Yasuaki Ishimatsu --- Reading git-diff-tree failed