summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-15 13:24:02 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-15 13:24:02 +0100
commitcecdb193c8d91a42d9489d00618cc3dfff92e55a (patch)
tree7d7e16d389efab64ff2c0799de50e0b19ab20077 /drivers/gpu
parentACPI / scan: Drop the second argument of acpi_bus_trim() (diff)
downloadlinux-cecdb193c8d91a42d9489d00618cc3dfff92e55a.tar.xz
linux-cecdb193c8d91a42d9489d00618cc3dfff92e55a.zip
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 <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions