]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/sbus/sbus.c
[PATCH] md: avoid possible BUG_ON in md bitmap handling
[linux-2.6-omap-h63xx.git] / drivers / sbus / sbus.c
index 16b59773c0bb9b66828b2887d4d4aa9f4af080fb..98fcbb3d5560bad9463109915e64f75222558853 100644 (file)
@@ -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)
@@ -233,7 +233,7 @@ static void __init build_one_sbus(struct device_node *dp, int num_sbus)
        sbus->ofdev.node = dp;
        sbus->ofdev.dev.parent = NULL;
        sbus->ofdev.dev.bus = &sbus_bus_type;
-       strcpy(sbus->ofdev.dev.bus_id, dp->path_component_name);
+       sprintf(sbus->ofdev.dev.bus_id, "sbus%d", num_sbus);
 
        if (of_device_register(&sbus->ofdev) != 0)
                printk(KERN_DEBUG "sbus: device registration error for %s!\n",