mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Reviewed-by: Aaron Lu <[email protected]>
This commit is contained in:
parent
9ccad66f01
commit
d9fef0c4d2
2 changed files with 58 additions and 82 deletions
|
|
@ -431,6 +431,9 @@ struct acpi_pci_root {
|
|||
};
|
||||
|
||||
/* helper */
|
||||
|
||||
struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
|
||||
u64 address, bool check_children);
|
||||
acpi_handle acpi_find_child(acpi_handle, u64, bool);
|
||||
static inline acpi_handle acpi_get_child(acpi_handle handle, u64 addr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue