diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-07-28 10:28:07 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-07-29 22:30:33 +1000 |
commit | b6ac59d39a348af29477d7bfdc3ba23526e3f4ea (patch) | |
tree | 088301b262c96312e397012ffdd6cddbebe2055a /arch/powerpc/platforms/powermac/pfunc_base.c | |
parent | f2af201002a8bc22500c04cc474ea480bf361351 (diff) |
powerpc: 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/20200728022807.87815-1-miaoqinglang@huawei.com
Diffstat (limited to 'arch/powerpc/platforms/powermac/pfunc_base.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/pfunc_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c index 62311e84a423..f5422506d4b0 100644 --- a/arch/powerpc/platforms/powermac/pfunc_base.c +++ b/arch/powerpc/platforms/powermac/pfunc_base.c @@ -114,7 +114,7 @@ static void macio_gpio_init_one(struct macio_chip *macio) * Ok, got one, we dont need anything special to track them down, so * we just create them all */ - for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) { + for_each_child_of_node(gparent, gp) { const u32 *reg = of_get_property(gp, "reg", NULL); unsigned long offset; if (reg == NULL) @@ -133,7 +133,7 @@ static void macio_gpio_init_one(struct macio_chip *macio) macio->of_node); /* And now we run all the init ones */ - for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) + for_each_child_of_node(gparent, gp) pmf_do_functions(gp, NULL, 0, PMF_FLAGS_ON_INIT, NULL); /* Note: We do not at this point implement the "at sleep" or "at wake" |