[SPARC64]: Add of_device layer and make ebus/isa use it.
Sparcspkr and power drivers are converted, to make sure it works. Eventually the SBUS device layer will use this as a sub-class. I really cannot cut loose on that bit until sparc32 is given the same infrastructure. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user