]> www.infradead.org Git - users/willy/xarray.git/commitdiff
powerpc/powermac/pfunc_base: Use helper function for_each_child_of_node()
authorZhang Zekun <zhangzekun11@huawei.com>
Thu, 22 Aug 2024 08:54:29 +0000 (16:54 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2024 12:30:34 +0000 (22:30 +1000)
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
arch/powerpc/platforms/powermac/pfunc_base.c

index 085e0ad20eba588501641259a4d6831af6a1b362..8253de737373530be3bdfacff99a1e1be3eafda4 100644 (file)
@@ -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;