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:
Родитель
9c826d31a7
Коммит
acff5e6c37
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче