]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ACPI: Rework acpi_get_child() to be more efficient
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Jan 2013 12:13:49 +0000 (13:13 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 25 Jan 2013 23:34:21 +0000 (00:34 +0100)
commit33f767d767e9a684e9cd60704d4c049a2014c8d5
tree22fbc06ee9eb22974955625ffc296b04e35a9090
parent949db153b6466c6f7cad5a427ecea94985927311
ACPI: Rework acpi_get_child() to be more efficient

Observe that acpi_get_child() doesn't need to use the helper
struct acpi_find_child structure and change it to work without it.
Also, using acpi_get_object_info() to get the output of _ADR for the
given device is overkill, because that function does much more than
just evaluating _ADR (let alone the additional memory allocation
done by it).

Moreover, acpi_get_child() doesn't need to loop any more once it has
found a matching handle, so make it stop in that case.  To prevent
the results from changing, make it use do_acpi_find_child() as
a post-order callback.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/glue.c