Skip to content

Commit

Permalink
drivers/macintosh/smu.c: 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 <miaoqinglang@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200916062122.190586-1-miaoqinglang@huawei.com
  • Loading branch information
Qinglang Miao authored and mpe committed Sep 18, 2020
1 parent 6c71cfc commit 9c826d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static void smu_expose_childs(struct work_struct *unused)
{
struct device_node *np;

for (np = NULL; (np = of_get_next_child(smu->of_node, np)) != NULL;)
for_each_child_of_node(smu->of_node, np)
if (of_device_is_compatible(np, "smu-sensors"))
of_platform_device_create(np, "smu-sensors",
&smu->of_dev->dev);
Expand Down

0 comments on commit 9c826d3

Please sign in to comment.