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/pasemi | |
parent | f2af201002a8bc22500c04cc474ea480bf361351 (diff) | |
download | linux-b6ac59d39a348af29477d7bfdc3ba23526e3f4ea.tar.bz2 |
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/pasemi')
-rw-r--r-- | arch/powerpc/platforms/pasemi/misc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pasemi/misc.c b/arch/powerpc/platforms/pasemi/misc.c index 1cd4ca14b08d..1bf65d02d3ba 100644 --- a/arch/powerpc/platforms/pasemi/misc.c +++ b/arch/powerpc/platforms/pasemi/misc.c @@ -56,8 +56,7 @@ static int __init pasemi_register_i2c_devices(void) if (!adap_node) continue; - node = NULL; - while ((node = of_get_next_child(adap_node, node))) { + for_each_child_of_node(adap_node, node) { struct i2c_board_info info = {}; const u32 *addr; int len; |