summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-04 17:21:50 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-13 17:26:22 +0200
commitcf6ba0750a22a54f5101986401271429995cc4a0 (patch)
treef59aa70e2f420216afab3f07a113a0fa2e77c071 /drivers/acpi
parentce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e (diff)
downloadlinux-cf6ba0750a22a54f5101986401271429995cc4a0.tar.gz
linux-cf6ba0750a22a54f5101986401271429995cc4a0.tar.bz2
linux-cf6ba0750a22a54f5101986401271429995cc4a0.zip
ACPI: bus: Introduce acpi_dev_for_each_child()
Introduce a wrapper around device_for_each_child() to iterate over the children of a given ACPI device object. This function will be used in subsequent change sets. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/bus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 3e58b613a2c4..e807bffc0804 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -1070,6 +1070,12 @@ int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data)
}
EXPORT_SYMBOL_GPL(acpi_bus_for_each_dev);
+int acpi_dev_for_each_child(struct acpi_device *adev,
+ int (*fn)(struct device *, void *), void *data)
+{
+ return device_for_each_child(&adev->dev, data, fn);
+}
+
/* --------------------------------------------------------------------------
Initialization/Cleanup
-------------------------------------------------------------------------- */