summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-16 14:21:25 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-18 19:59:44 +1000
commitacff5e6c37fa4bf8d002c917a762c4f7615f6eaf (patch)
tree62aa314bc4d0edc0188fa79e18b94dd189ffb255 /drivers/macintosh
parent9c826d31a73815464bd3df81e56d39b3d908ac73 (diff)
downloadlinux-acff5e6c37fa4bf8d002c917a762c4f7615f6eaf.tar.bz2
macintosh: smu_sensors: 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/20200916062125.190729-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/windfarm_smu_sensors.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c
index 3e6059eaa138..c8706cfb83fd 100644
--- a/drivers/macintosh/windfarm_smu_sensors.c
+++ b/drivers/macintosh/windfarm_smu_sensors.c
@@ -421,8 +421,7 @@ static int __init smu_sensors_init(void)
return -ENODEV;
/* Look for sensors subdir */
- for (sensors = NULL;
- (sensors = of_get_next_child(smu, sensors)) != NULL;)
+ for_each_child_of_node(smu, sensors)
if (of_node_name_eq(sensors, "sensors"))
break;