diff options
| author | David S. Miller <davem@davemloft.net> | 2018-11-18 13:35:31 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-11-18 13:35:31 -0800 |
| commit | 20a9da34ae009176e443e217f3747635fc4bc57f (patch) | |
| tree | 92e27b19a55ec7c039a4941e861f668fd3b0cdc8 /arch/sparc/kernel/sun4d_irq.c | |
| parent | 25e19c1fe421280a47f37c3571aa379e6e67966c (diff) | |
| parent | 86ef771ed543ad19fd984e715348eaeeb0b4e035 (diff) | |
Merge branch 'sparc-OF-name-and-device_type-rework'
Rob Herring says:
====================
sparc: OF name and device_type rework
All other platforms have been converted to only store the local node name
in device_node.full_name except Sparc. Sparc was complicated by having a
path_component_name in addition to full_name and name. By switching
full_name to just the local node name, path_component_name becomes
redundant and can be removed.
The rest of the series converts the sparc code to use printf specifiers
and helper functions to access node name and device_type instead of
directly accessing device_node full_name, name and type pointers.
I've tested this series under qemu.
v2:
- Add patch using of_node_name_eq for openpromfs
- Add patch converting some resource names to full_name
- Also drop full path on !Sparc PDT node name construction
- Add a few missed %pOFn conversions
====================
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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index d869d409fce6..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,16 +360,16 @@ 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)) { - printk(KERN_ERR "%s: Error, parent is not %s.\n", - bus->full_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; } board_parent = bus->parent; board = of_getintprop_default(board_parent, "board#", -1); if (board == -1) { - printk(KERN_ERR "%s: Error, lacks board# property.\n", - board_parent->full_name); + printk(KERN_ERR "%pOF: Error, lacks board# property.\n", + board_parent); goto err_out; } |
