• Rafael J. Wysocki's avatar
    ACPI: Rework acpi_get_child() to be more efficient · 33f767d7
    Rafael J. Wysocki authored
    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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    33f767d7
glue.c 7.26 KB