diff options
Diffstat (limited to 'arch/sparc64/kernel/ebus.c')
-rw-r--r-- | arch/sparc64/kernel/ebus.c | 21 |
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: | |||
475 | } | 475 | } |
476 | } | 476 | } |
477 | 477 | ||
478 | dev->ofdev.node = dp; | ||
479 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | ||
480 | dev->ofdev.dev.bus = &ebus_bus_type; | ||
481 | strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); | ||
482 | |||
483 | /* Register with core */ | ||
484 | if (of_device_register(&dev->ofdev) != 0) | ||
485 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | ||
486 | dev->ofdev.dev.bus_id); | ||
487 | |||
478 | dp = dp->child; | 488 | dp = dp->child; |
479 | if (dp) { | 489 | if (dp) { |
480 | printk(" ->"); | 490 | printk(" ->"); |
@@ -570,6 +580,17 @@ void __init ebus_init(void) | |||
570 | ebus->self = pdev; | 580 | ebus->self = pdev; |
571 | ebus->parent = pbm = cookie->pbm; | 581 | ebus->parent = pbm = cookie->pbm; |
572 | 582 | ||
583 | ebus->ofdev.node = dp; | ||
584 | ebus->ofdev.dev.parent = &pdev->dev; | ||
585 | ebus->ofdev.dev.bus = &ebus_bus_type; | ||
586 | strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); | ||
587 | |||
588 | /* Register with core */ | ||
589 | if (of_device_register(&ebus->ofdev) != 0) | ||
590 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | ||
591 | ebus->ofdev.dev.bus_id); | ||
592 | |||
593 | |||
573 | child = dp->child; | 594 | child = dp->child; |
574 | if (!child) | 595 | if (!child) |
575 | goto next_ebus; | 596 | goto next_ebus; |