]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ACPI / bind: Simplify child device lookups
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 27 Nov 2013 00:54:09 +0000 (01:54 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 27 Nov 2013 00:54:09 +0000 (01:54 +0100)
commit5bccceec0590e5803bb9b953262499bcb6e75fc5
treebf1e6b587f8bd888c05bff2ad31647918809ebaa
parent2c22e6520ac87d8b12d4d9941e81d4119f2d903c
ACPI / bind: Simplify child device lookups

Now that we create a struct acpi_device object for every ACPI
namespace node representing a device, it is not necessary to
use acpi_walk_namespace() for child device lookup in
acpi_find_child() any more.  Instead, we can simply walk the
list of children of the given struct acpi_device object and
return the matching one (or the one which is the best match if
there are more of them).  The checks done during the matching
loop can be simplified too so that the secondary namespace walks
in find_child_checks() are not necessary any more.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
drivers/acpi/glue.c
include/acpi/acpi_bus.h