diff options
author | Rob Herring <robh@kernel.org> | 2018-12-05 13:50:18 -0600 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-12-22 21:29:50 +1100 |
commit | 2c8e65b595cf0bf7c1413404dff9b928a64d27cb (patch) | |
tree | 88944063653016523cd63a065876c507ab1651c0 /arch/powerpc/platforms/chrp | |
parent | 0d1223dd9273b2ba3e965a81092a239405a4931c (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/chrp')
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 3c21f046e20c..e66644e0fb40 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c @@ -287,10 +287,7 @@ static __init void chrp_init(void) * or /pci@80000000/isa@C/serial@i2F8 * The optional graphics card has also type 'serial' in VGA mode. */ - property = of_get_property(node, "name", NULL); - if (!property) - goto out_put; - if (!strcmp(property, "failsafe") || !strcmp(property, "serial")) + if (of_node_name_eq(node, "failsafe") || of_node_name_eq(node, "serial")) add_preferred_console("ttyS", 0, NULL); out_put: of_node_put(node); |