diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-10-05 05:07:32 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-09 20:24:52 -0400 |
commit | 4b75eb2bd30707c1af76145fd3a4ec2d890e1870 (patch) | |
tree | 8297f3968f759788a8cb2e385dfb6e24ae18a6c4 /arch/sparc64 | |
parent | 99ae1c83b5107cd91e45d4d3c7bf096cdff0cf06 (diff) |
[SPARC64]: Fix of_device bus_id settings.
They have to be unique system-wide, so use
"NAME@NODE" as the string pattern of the non-root
nodes.
Thanks to Andrew Morton for fixing the error value
checking in bus_add_device() which made this problem
finally noticable.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 7f9204535770..d822c7c18e1f 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -841,7 +841,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
841 | if (!parent) | 841 | if (!parent) |
842 | strcpy(op->dev.bus_id, "root"); | 842 | strcpy(op->dev.bus_id, "root"); |
843 | else | 843 | else |
844 | strcpy(op->dev.bus_id, dp->path_component_name); | 844 | sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node); |
845 | 845 | ||
846 | if (of_device_register(op)) { | 846 | if (of_device_register(op)) { |
847 | printk("%s: Could not register of device.\n", | 847 | printk("%s: Could not register of device.\n", |