]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/cell/cbe_regs.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / cell / cbe_regs.c
index 12c9674b4b1f27d51f20f590613a7f1afb1273be..16a9b07e7b0c24b75b2a5c17b779a5f3e12f4a27 100644 (file)
@@ -16,8 +16,7 @@
 #include <asm/ptrace.h>
 #include <asm/of_device.h>
 #include <asm/of_platform.h>
-
-#include "cbe_regs.h"
+#include <asm/cell-regs.h>
 
 /*
  * Current implementation uses "cpu" nodes. We build our own mapping
@@ -174,6 +173,13 @@ static struct device_node *cbe_get_be_node(int cpu_id)
 
                cpu_handle = of_get_property(np, "cpus", &len);
 
+               /*
+                * the CAB SLOF tree is non compliant, so we just assume
+                * there is only one node
+                */
+               if (WARN_ON_ONCE(!cpu_handle))
+                       return np;
+
                for (i=0; i<len; i++)
                        if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL))
                                return np;