diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-22 10:51:34 +0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-22 10:51:34 +0400 |
commit | 985990137e81ca9fd6561cd0f7d1a9695ec57d5a (patch) | |
tree | 7a67493285623a7356ba7065cada6728993d1a3b /arch/powerpc/platforms/powermac/setup.c | |
parent | 834289447542b7ec55c0847486616d4d53ddf891 (diff) | |
parent | 63172cb3d5ef762dcb60a292bc7f016b85cf6e1f (diff) | |
download | linux-985990137e81ca9fd6561cd0f7d1a9695ec57d5a.tar.xz |
Merge changes from linux-2.6 by hand
Diffstat (limited to 'arch/powerpc/platforms/powermac/setup.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index da0cb165dfc6..50f5dd787900 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -669,7 +669,7 @@ static int pmac_check_legacy_ioport(unsigned int baseport) static int __init pmac_declare_of_platform_devices(void) { - struct device_node *np; + struct device_node *np, *npp; np = find_devices("uni-n"); if (np) { @@ -687,14 +687,16 @@ static int __init pmac_declare_of_platform_devices(void) if (np) of_platform_device_create(np, "platinum", NULL); - np = find_devices("u3"); - if (np) { - for (np = np->child; np != NULL; np = np->sibling) + npp = of_find_node_by_name(NULL, "u3"); + if (npp) { + for (np = NULL; (np = of_get_next_child(npp, np)) != NULL;) { if (strncmp(np->name, "i2c", 3) == 0) { - of_platform_device_create(np, "u3-i2c", - NULL); + of_platform_device_create(np, "u3-i2c", NULL); + of_node_put(np); break; } + } + of_node_put(npp); } np = of_find_node_by_type(NULL, "smu"); if (np) { |