diff options
author | Rob Herring <robh@kernel.org> | 2018-11-17 00:06:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-19 00:35:21 +0300 |
commit | 29c990dfc77c58b21a0f2ff4640b6a26955d0661 (patch) | |
tree | defc761de237c9456c793e485c00a247ea5ab795 /arch/sparc/include/asm/floppy_64.h | |
parent | ead1c2bdedcb98217f95430e41bf282326edc8d4 (diff) | |
download | linux-29c990dfc77c58b21a0f2ff4640b6a26955d0661.tar.xz |
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/asm/floppy_64.h')
-rw-r--r-- | arch/sparc/include/asm/floppy_64.h | 8 |
1 files changed, 4 insertions, 4 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); |