summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powermac/pic.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-12-05 13:50:18 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-22 21:29:50 +1100
commit2c8e65b595cf0bf7c1413404dff9b928a64d27cb (patch)
tree88944063653016523cd63a065876c507ab1651c0 /arch/powerpc/platforms/powermac/pic.c
parent0d1223dd9273b2ba3e965a81092a239405a4931c (diff)
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/powermac/pic.c')
-rw-r--r--arch/powerpc/platforms/powermac/pic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 5a71395e535e..c292ffac2ed4 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -553,13 +553,13 @@ void __init pmac_pic_init(void)
for_each_node_with_property(np, "interrupt-controller") {
/* Skip /chosen/interrupt-controller */
- if (strcmp(np->name, "chosen") == 0)
+ if (of_node_name_eq(np, "chosen"))
continue;
/* It seems like at least one person wants
* to use BootX on a machine with an AppleKiwi
* controller which happens to pretend to be an
* interrupt controller too. */
- if (strcmp(np->name, "AppleKiwi") == 0)
+ if (of_node_name_eq(np, "AppleKiwi"))
continue;
/* I think we found one ! */
of_irq_dflt_pic = np;