Commit cf6ba075 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent ce522ba9
...@@ -1070,6 +1070,12 @@ int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data) ...@@ -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); 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 Initialization/Cleanup
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
......
...@@ -481,6 +481,8 @@ void acpi_initialize_hp_context(struct acpi_device *adev, ...@@ -481,6 +481,8 @@ void acpi_initialize_hp_context(struct acpi_device *adev,
extern struct bus_type acpi_bus_type; extern struct bus_type acpi_bus_type;
int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data); 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 device *, void *), void *data);
/* /*
* Events * Events
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment