ACPI: scan: Add acpi_dev_get_next_consumer_dev()
authorDaniel Scally <djrscally@gmail.com>
Wed, 21 Sep 2022 23:04:35 +0000 (00:04 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 24 Sep 2022 17:12:32 +0000 (19:12 +0200)
commitcca8a7efea6402f463239a1bb337d01b0cad7b2e
treeeb7ce6efbf056a9a0703df30358d8c15f60390b4
parent98378956a407392109817278c6edd464252c7a83
ACPI: scan: Add acpi_dev_get_next_consumer_dev()

In commit b83e2b306736 ("ACPI: scan: Add function to fetch dependent
of ACPI device") we added a means of fetching the first device to
declare itself dependent on another ACPI device in the _DEP method.
One assumption in that patch was that there would only be a single
consuming device, but this has not held.

Replace that function with a new function that fetches the next consumer
of a supplier device. Where no "previous" consumer is passed in, it
behaves identically to the original function.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c
drivers/platform/x86/intel/int3472/common.c
include/acpi/acpi_bus.h