aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/sbus.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 /drivers/sbus/sbus.c
parente80391500078b524083ba51c3df01bbaaecc94bb (diff)
downloadkernel_samsung_smdk4412-f5ef9d11fd255b30b455d18f8d721bc44cd1296b.zip
kernel_samsung_smdk4412-f5ef9d11fd255b30b455d18f8d721bc44cd1296b.tar.gz
kernel_samsung_smdk4412-f5ef9d11fd255b30b455d18f8d721bc44cd1296b.tar.bz2
[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 'drivers/sbus/sbus.c')
-rw-r--r--drivers/sbus/sbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c
index 935952e..98fcbb3 100644
--- a/drivers/sbus/sbus.c
+++ b/drivers/sbus/sbus.c
@@ -61,11 +61,11 @@ static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sde
else
sdev->ofdev.dev.parent = &sdev->bus->ofdev.dev;
sdev->ofdev.dev.bus = &sbus_bus_type;
- strcpy(sdev->ofdev.dev.bus_id, dp->path_component_name);
+ sprintf(sdev->ofdev.dev.bus_id, "sbus[%08x]", dp->node);
if (of_device_register(&sdev->ofdev) != 0)
printk(KERN_DEBUG "sbus: device registration error for %s!\n",
- sdev->ofdev.dev.bus_id);
+ dp->path_component_name);
}
static void __init sbus_bus_ranges_init(struct device_node *dp, struct sbus_bus *sbus)