summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorZhang Zekun <zhangzekun11@huawei.com>2024-08-22 16:54:29 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2024-08-29 22:30:34 +1000
commit197116e2dec8d23888ce76044fe673480afceff0 (patch)
tree1ac9bacc5c562c27eac8f852e69a0b189aaa2008 /arch
parent8ae4f16f7d7b59cca55aeca6db7c9636ffe7fbaa (diff)
powerpc/powermac/pfunc_base: Use helper function for_each_child_of_node()
for_each_child_of_node() can help to iterate through the device_node, and we don't need to do it manually. No functional change with this conversion. Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240822085430.25753-2-zhangzekun11@huawei.com
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 085e0ad20eba..8253de737373 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -313,7 +313,7 @@ static void __init uninorth_install_pfunc(void)
/*
* Install handlers for the hwclock child if any
*/
- for (np = NULL; (np = of_get_next_child(uninorth_node, np)) != NULL;)
+ for_each_child_of_node(uninorth_node, np)
if (of_node_name_eq(np, "hw-clock")) {
unin_hwclock = np;
break;