mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
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
This commit is contained in:
parent
9c826d31a7
commit
acff5e6c37
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user