Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux
[cascardo/linux.git] / arch / powerpc / platforms / pseries / setup.c
index f2f40e6..e724d31 100644 (file)
@@ -232,8 +232,7 @@ static void __init pseries_discover_pic(void)
        struct device_node *np;
        const char *typep;
 
-       for (np = NULL; (np = of_find_node_by_name(np,
-                                                  "interrupt-controller"));) {
+       for_each_node_by_name(np, "interrupt-controller") {
                typep = of_get_property(np, "compatible", NULL);
                if (strstr(typep, "open-pic")) {
                        pSeries_mpic_node = of_node_get(np);
@@ -351,7 +350,7 @@ static int alloc_dispatch_log_kmem_cache(void)
 
        return alloc_dispatch_logs();
 }
-early_initcall(alloc_dispatch_log_kmem_cache);
+machine_early_initcall(pseries, alloc_dispatch_log_kmem_cache);
 
 static void pseries_lpar_idle(void)
 {