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/kernel/sun4d_irq.c | |
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/kernel/sun4d_irq.c')
-rw-r--r-- | arch/sparc/kernel/sun4d_irq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 6d266d7dd2b6..9a137c70e8d1 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c @@ -335,12 +335,12 @@ static unsigned int sun4d_build_device_irq(struct platform_device *op, irq = real_irq; while (bus) { - if (!strcmp(bus->name, "sbi")) { + if (of_node_name_eq(bus, "sbi")) { bus_connection = "io-unit"; break; } - if (!strcmp(bus->name, "bootbus")) { + if (of_node_name_eq(bus, "bootbus")) { bus_connection = "cpu-unit"; break; } @@ -360,7 +360,7 @@ static unsigned int sun4d_build_device_irq(struct platform_device *op, * If Bus nodes parent is not io-unit/cpu-unit or the io-unit/cpu-unit * lacks a "board#" property, something is very wrong. */ - if (!bus->parent || strcmp(bus->parent->name, bus_connection)) { + if (!of_node_name_eq(bus->parent, bus_connection)) { printk(KERN_ERR "%pOF: Error, parent is not %s.\n", bus, bus_connection); goto err_out; |