Skip to content

Commit

Permalink
macintosh: smu_sensors: use for_each_child_of_node() macro
Browse files Browse the repository at this point in the history
Use for_each_child_of_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Qinglang Miao authored and mpe committed Sep 18, 2020
1 parent 9c826d3 commit acff5e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/macintosh/windfarm_smu_sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit acff5e6

Please sign in to comment.