summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>2013-09-18 12:53:04 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-31 06:19:18 +0100
commitafaf53985431bb295e4b723b08a55d0540cf8070 (patch)
treee4d023321dd6c5fa0bda5290dbf7ffa137896cd9 /arch/powerpc/kernel/prom.c
parentpowerpc/tm: Remove interrupt disable in __switch_to() (diff)
downloadlinux-afaf53985431bb295e4b723b08a55d0540cf8070.tar.xz
linux-afaf53985431bb295e4b723b08a55d0540cf8070.zip
powerpc: Remove big endianness assumption in of_find_next_cache_node
Currently big endianness of the device tree data is assumed in of_find_next_cache_node for 'handle' when calling of_find_node_by_phandle. In preparation to move this function to common code, this patch fixes the endianness using 'be32_to_cpup' Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index b7634ce41dbc..09be2759c314 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -778,7 +778,7 @@ struct device_node *of_find_next_cache_node(struct device_node *np)
handle = of_get_property(np, "next-level-cache", NULL);
if (handle)
- return of_find_node_by_phandle(*handle);
+ return of_find_node_by_phandle(be32_to_cpup(handle));
/* OF on pmac has nodes instead of properties named "l2-cache"
* beneath CPU nodes.