diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-16 14:21:22 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-09-18 19:59:44 +1000 |
commit | 9c826d31a73815464bd3df81e56d39b3d908ac73 (patch) | |
tree | e10fc9955adcccd2b58ba04960ef375e17788ce1 /drivers/macintosh | |
parent | 6c71cfcc01685ef495ca7886471a76e73446424e (diff) |
drivers/macintosh/smu.c: use for_each_child_of_node() macro
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200916062122.190586-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/smu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index ca2a0bc5c33e..51b6f2aa5291 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -638,7 +638,7 @@ static void smu_expose_childs(struct work_struct *unused) { struct device_node *np; - for (np = NULL; (np = of_get_next_child(smu->of_node, np)) != NULL;) + for_each_child_of_node(smu->of_node, np) if (of_device_is_compatible(np, "smu-sensors")) of_platform_device_create(np, "smu-sensors", &smu->of_dev->dev); |