From: Sudeep KarkadaNagesha Date: Wed, 18 Sep 2013 10:53:04 +0000 (+0100) Subject: powerpc: Remove big endianness assumption in of_find_next_cache_node X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afaf53985431bb295e4b723b08a55d0540cf8070;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Cc: Grant Likely Cc: Rob Herring Signed-off-by: Sudeep KarkadaNagesha Signed-off-by: Benjamin Herrenschmidt --- 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.