summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/ebus.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/ebus.c')
-rw-r--r--arch/sparc64/kernel/ebus.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index 33d79e10c653..b390a2f3a15e 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -475,6 +475,16 @@ probe_interrupts:
}
}
+ dev->ofdev.node = dp;
+ dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
+ dev->ofdev.dev.bus = &ebus_bus_type;
+ strcpy(dev->ofdev.dev.bus_id, dp->path_component_name);
+
+ /* Register with core */
+ if (of_device_register(&dev->ofdev) != 0)
+ printk(KERN_DEBUG "ebus: device registration error for %s!\n",
+ dev->ofdev.dev.bus_id);
+
dp = dp->child;
if (dp) {
printk(" ->");
@@ -570,6 +580,17 @@ void __init ebus_init(void)
ebus->self = pdev;
ebus->parent = pbm = cookie->pbm;
+ ebus->ofdev.node = dp;
+ ebus->ofdev.dev.parent = &pdev->dev;
+ ebus->ofdev.dev.bus = &ebus_bus_type;
+ strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name);
+
+ /* Register with core */
+ if (of_device_register(&ebus->ofdev) != 0)
+ printk(KERN_DEBUG "ebus: device registration error for %s!\n",
+ ebus->ofdev.dev.bus_id);
+
+
child = dp->child;
if (!child)
goto next_ebus;