]> Pileus Git - ~andy/linux/commit
ACPI / bind: Simplify child device lookups
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Nov 2013 22:57:58 +0000 (23:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 7 Dec 2013 00:05:48 +0000 (01:05 +0100)
commitd9fef0c4d2e08c3888add77f1dc54fb12afb3928
treed5492f76a4cb79f7c18415585095b60cc7d84fe4
parent9ccad66f0171578445175ecd3bf66b35a96aaf6e
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