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 <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
This commit is contained in:
Rafael J. Wysocki committed 2022-04-13 17:26:22 +02:00
1 parent ce522ba9ef
commit cf6ba0750a
2 files changed
+8

No files matched your search

+6
View File
@@ -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
-------------------------------------------------------------------------- */
+2
View File
@@ -481,6 +481,8 @@ void acpi_initialize_hp_context(struct acpi_device *adev,
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 device *, void *), void *data);
/*
* Events