summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/of_device_32.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-16 15:06:58 -0600
committerDavid S. Miller <davem@davemloft.net>2018-11-18 13:35:21 -0800
commit29c990dfc77c58b21a0f2ff4640b6a26955d0661 (patch)
treedefc761de237c9456c793e485c00a247ea5ab795 /arch/sparc/kernel/of_device_32.c
parentead1c2bdedcb98217f95430e41bf282326edc8d4 (diff)
downloadlinux-stable-29c990dfc77c58b21a0f2ff4640b6a26955d0661.tar.gz
linux-stable-29c990dfc77c58b21a0f2ff4640b6a26955d0661.tar.bz2
linux-stable-29c990dfc77c58b21a0f2ff4640b6a26955d0661.zip
sparc: 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. Cc: "David S. Miller" <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/of_device_32.c')
-rw-r--r--arch/sparc/kernel/of_device_32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index ab133e2753ab..dc5b1b0ec659 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -232,10 +232,10 @@ static int __init use_1to1_mapping(struct device_node *pp)
* But, we should still pass the translation work up
* to the SBUS itself.
*/
- if (!strcmp(pp->name, "dma") ||
- !strcmp(pp->name, "espdma") ||
- !strcmp(pp->name, "ledma") ||
- !strcmp(pp->name, "lebuffer"))
+ if (of_node_name_eq(pp, "dma") ||
+ of_node_name_eq(pp, "espdma") ||
+ of_node_name_eq(pp, "ledma") ||
+ of_node_name_eq(pp, "lebuffer"))
return 0;
return 1;