projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c71cfc
)
drivers/macintosh/smu.c: use for_each_child_of_node() macro
author
Qinglang Miao
<miaoqinglang@huawei.com>
Wed, 16 Sep 2020 06:21:22 +0000
(14:21 +0800)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Fri, 18 Sep 2020 09:59:44 +0000
(19:59 +1000)
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
drivers/macintosh/smu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/macintosh/smu.c
b/drivers/macintosh/smu.c
index ca2a0bc5c33e649c26cc1f351ff92de30fdceb3f..51b6f2aa52918676c59d741d64df3ab8c5555fcd 100644
(file)
--- 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);