Commit acff5e6c authored by Qinglang Miao's avatar Qinglang Miao Committed by Michael Ellerman

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: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200916062125.190729-1-miaoqinglang@huawei.com
parent 9c826d31
...@@ -421,8 +421,7 @@ static int __init smu_sensors_init(void) ...@@ -421,8 +421,7 @@ static int __init smu_sensors_init(void)
return -ENODEV; return -ENODEV;
/* Look for sensors subdir */ /* Look for sensors subdir */
for (sensors = NULL; for_each_child_of_node(smu, sensors)
(sensors = of_get_next_child(smu, sensors)) != NULL;)
if (of_node_name_eq(sensors, "sensors")) if (of_node_name_eq(sensors, "sensors"))
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment