diff options
Diffstat (limited to 'arch/ppc64/kernel/pmac_setup.c')
-rw-r--r-- | arch/ppc64/kernel/pmac_setup.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c index 1f5118078f7d..bb0c3bfbb7e2 100644 --- a/arch/ppc64/kernel/pmac_setup.c +++ b/arch/ppc64/kernel/pmac_setup.c | |||
@@ -434,15 +434,23 @@ static int pmac_check_legacy_ioport(unsigned int baseport) | |||
434 | 434 | ||
435 | static int __init pmac_declare_of_platform_devices(void) | 435 | static int __init pmac_declare_of_platform_devices(void) |
436 | { | 436 | { |
437 | struct device_node *np; | 437 | struct device_node *np, *npp; |
438 | 438 | ||
439 | np = find_devices("u3"); | 439 | npp = of_find_node_by_name(NULL, "u3"); |
440 | if (np) { | 440 | if (npp) { |
441 | for (np = np->child; np != NULL; np = np->sibling) | 441 | for (np = NULL; (np = of_get_next_child(npp, np)) != NULL;) { |
442 | if (strncmp(np->name, "i2c", 3) == 0) { | 442 | if (strncmp(np->name, "i2c", 3) == 0) { |
443 | of_platform_device_create(np, "u3-i2c"); | 443 | of_platform_device_create(np, "u3-i2c", NULL); |
444 | of_node_put(np); | ||
444 | break; | 445 | break; |
445 | } | 446 | } |
447 | } | ||
448 | of_node_put(npp); | ||
449 | } | ||
450 | npp = of_find_node_by_type(NULL, "smu"); | ||
451 | if (npp) { | ||
452 | of_platform_device_create(npp, "smu", NULL); | ||
453 | of_node_put(npp); | ||
446 | } | 454 | } |
447 | 455 | ||
448 | return 0; | 456 | return 0; |