mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02: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:
committed by
Michael Ellerman
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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user