projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a3181e
)
macintosh: windfarm: use for_each_child_of_node() macro
author
Qinglang Miao
<miaoqinglang@huawei.com>
Mon, 14 Sep 2020 06:14:11 +0000
(14:14 +0800)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Tue, 15 Sep 2020 12:13:39 +0000
(22:13 +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/20200914061411.3356-1-miaoqinglang@huawei.com
drivers/macintosh/windfarm_smu_sat.c
patch
|
blob
|
history
diff --git
a/drivers/macintosh/windfarm_smu_sat.c
b/drivers/macintosh/windfarm_smu_sat.c
index
cb75dc0
..
e46e115
100644
(file)
--- a/
drivers/macintosh/windfarm_smu_sat.c
+++ b/
drivers/macintosh/windfarm_smu_sat.c
@@
-216,8
+216,7
@@
static int wf_sat_probe(struct i2c_client *client,
vsens[0] = vsens[1] = -1;
isens[0] = isens[1] = -1;
- child = NULL;
- while ((child = of_get_next_child(dev, child)) != NULL) {
+ for_each_child_of_node(dev, child) {
reg = of_get_property(child, "reg", NULL);
loc = of_get_property(child, "location", NULL);
if (reg == NULL || loc == NULL)