summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pasemi
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-07-28 05:28:07 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-29 15:30:33 +0300
commitb6ac59d39a348af29477d7bfdc3ba23526e3f4ea (patch)
tree088301b262c96312e397012ffdd6cddbebe2055a /arch/powerpc/platforms/pasemi
parentf2af201002a8bc22500c04cc474ea480bf361351 (diff)
downloadlinux-b6ac59d39a348af29477d7bfdc3ba23526e3f4ea.tar.xz
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.c3
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;