diff options
author | Rob Herring <robh@kernel.org> | 2018-12-05 22:50:18 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-12-22 13:29:50 +0300 |
commit | 2c8e65b595cf0bf7c1413404dff9b928a64d27cb (patch) | |
tree | 88944063653016523cd63a065876c507ab1651c0 /arch/powerpc/platforms/44x | |
parent | 0d1223dd9273b2ba3e965a81092a239405a4931c (diff) | |
download | linux-2c8e65b595cf0bf7c1413404dff9b928a64d27cb.tar.xz |
powerpc: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.
A couple of open coded iterating thru the child node names are converted
to use for_each_child_of_node() instead.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/44x')
-rw-r--r-- | arch/powerpc/platforms/44x/warp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index 7e4f8ca19ce8..f467247fd1c4 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c @@ -179,9 +179,9 @@ static int pika_setup_leds(void) } for_each_child_of_node(np, child) - if (strcmp(child->name, "green") == 0) + if (of_node_name_eq(child, "green")) green_led = of_get_gpio(child, 0); - else if (strcmp(child->name, "red") == 0) + else if (of_node_name_eq(child, "red")) red_led = of_get_gpio(child, 0); of_node_put(np); |