Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/macintosh/smu.c: 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/20200916062122.190586-1-miaoqinglang@huawei.com

authored by

Qinglang Miao and committed by
Michael Ellerman
9c826d31 6c71cfcc

+1 -1
+1 -1
drivers/macintosh/smu.c
··· 638 638 { 639 639 struct device_node *np; 640 640 641 - for (np = NULL; (np = of_get_next_child(smu->of_node, np)) != NULL;) 641 + for_each_child_of_node(smu->of_node, np) 642 642 if (of_device_is_compatible(np, "smu-sensors")) 643 643 of_platform_device_create(np, "smu-sensors", 644 644 &smu->of_dev->dev);