summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/of_device.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-10-27 01:03:31 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-27 01:03:31 -0700
commitf5ef9d11fd255b30b455d18f8d721bc44cd1296b (patch)
tree61a31b476ac98c05bf0210b169171aa6afb3e007 /arch/sparc/kernel/of_device.c
parente80391500078b524083ba51c3df01bbaaecc94bb (diff)
[SPARC]: Fix bus_id[] string overflow.
dp->path_component_name can be larger than ->bus_id[] so use a different naming scheme for this stuff. Noticed by Jurij Smakov. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/of_device.c')
-rw-r--r--arch/sparc/kernel/of_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 74bef2a2d37f..46200c43ffb1 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -651,7 +651,7 @@ build_resources:
if (!parent)
strcpy(op->dev.bus_id, "root");
else
- strcpy(op->dev.bus_id, dp->path_component_name);
+ sprintf(op->dev.bus_id, "%08x", dp->node);
if (of_device_register(op)) {
printk("%s: Could not register of device.\n",