提交 8e98750f 编写于 作者: R Rafael J. Wysocki 提交者: Zhong Jinghua

ACPI: bus: Introduce acpi_dev_for_each_child()

mainline inclusion
from mainline-v5.19-rc
commit cf6ba075
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I67QNJ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cf6ba0750a22a54f5101986401271429995cc4a0

--------------------------------------------

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: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NZhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
上级 be3a5f25
......@@ -966,6 +966,12 @@ struct bus_type acpi_bus_type = {
.uevent = acpi_device_uevent,
};
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
-------------------------------------------------------------------------- */
......
......@@ -494,6 +494,8 @@ void acpi_bus_detach_private_data(acpi_handle);
extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
extern int register_acpi_notifier(struct notifier_block *);
extern int unregister_acpi_notifier(struct notifier_block *);
int acpi_dev_for_each_child(struct acpi_device *adev,
int (*fn)(struct device *, void *), void *data);
/*
* External Functions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册