diff options
author | Rob Herring <robh@kernel.org> | 2018-11-16 22:06:58 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-18 22:35:21 +0100 |
commit | 29c990dfc77c58b21a0f2ff4640b6a26955d0661 (patch) | |
tree | defc761de237c9456c793e485c00a247ea5ab795 /arch/sparc/include | |
parent | sparc: Convert to using %pOFn instead of device_node.name (diff) | |
download | linux-29c990dfc77c58b21a0f2ff4640b6a26955d0661.tar.xz linux-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/include')
-rw-r--r-- | arch/sparc/include/asm/floppy_64.h | 8 | ||||
-rw-r--r-- | arch/sparc/include/asm/parport.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h index 2a050eab69a0..3729fc35ba83 100644 --- a/arch/sparc/include/asm/floppy_64.h +++ b/arch/sparc/include/asm/floppy_64.h @@ -528,9 +528,9 @@ static int sun_pci_fd_test_drive(unsigned long port, int drive) static int __init ebus_fdthree_p(struct device_node *dp) { - if (!strcmp(dp->name, "fdthree")) + if (of_node_name_eq(dp, "fdthree")) return 1; - if (!strcmp(dp->name, "floppy")) { + if (of_node_name_eq(dp, "floppy")) { const char *compat; compat = of_get_property(dp, "compatible", NULL); @@ -555,7 +555,7 @@ static unsigned long __init sun_floppy_init(void) op = NULL; for_each_node_by_name(dp, "SUNW,fdtwo") { - if (strcmp(dp->parent->name, "sbus")) + if (!of_node_name_eq(dp->parent, "sbus")) continue; op = of_find_device_by_node(dp); if (op) @@ -656,7 +656,7 @@ static unsigned long __init sun_floppy_init(void) */ config = 0; for (dp = ebus_dp->child; dp; dp = dp->sibling) { - if (!strcmp(dp->name, "ecpp")) { + if (of_node_name_eq(dp, "ecpp")) { struct platform_device *ecpp_op; ecpp_op = of_find_device_by_node(dp); diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index 3c5a1c620f0f..03b27090c0c8 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h @@ -117,7 +117,7 @@ static int ecpp_probe(struct platform_device *op) int slot, err; parent = op->dev.of_node->parent; - if (!strcmp(parent->name, "dma")) { + if (of_node_name_eq(parent, "dma")) { p = parport_pc_probe_port(base, base + 0x400, op->archdata.irqs[0], PARPORT_DMA_NOFIFO, op->dev.parent->parent, 0); |