summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-06-13 21:26:47 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-06-20 21:33:15 +0300
commitff32e59947c87b01dc25a8b5763d609c1a8f56eb (patch)
tree863d4075428b441b3cae9b2250a5482303f1af97 /include/acpi
parent0ea3ef240c49113cefbaab1f3dbf5b7f46837fc0 (diff)
downloadlinux-ff32e59947c87b01dc25a8b5763d609c1a8f56eb.tar.xz
ACPI: bus: Introduce acpi_dev_for_each_child_reverse()
Make it possible to walk the children of an ACPI device in the revese order by defining acpi_dev_for_each_child_reverse() in analogy with acpi_dev_for_each_child(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 597961969ca1..76de1aa5d221 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -483,6 +483,9 @@ extern struct bus_type acpi_bus_type;
int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data);
int acpi_dev_for_each_child(struct acpi_device *adev,
int (*fn)(struct acpi_device *, void *), void *data);
+int acpi_dev_for_each_child_reverse(struct acpi_device *adev,
+ int (*fn)(struct acpi_device *, void *),
+ void *data);
/*
* Events