From: David S. Miller Date: Thu, 5 Oct 2006 09:07:32 +0000 (-0700) Subject: [SPARC64]: Fix of_device bus_id settings. X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~44354^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4b75eb2bd30707c1af76145fd3a4ec2d890e1870;p=mirror_ubuntu-artful-kernel.git [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 --- 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, if (!parent) strcpy(op->dev.bus_id, "root"); else - strcpy(op->dev.bus_id, dp->path_component_name); + sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node); if (of_device_register(op)) { printk("%s: Could not register of device.\n",