]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc: Remove big endianness assumption in of_find_next_cache_node
authorSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Wed, 18 Sep 2013 10:53:04 +0000 (11:53 +0100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 31 Oct 2013 05:19:18 +0000 (16:19 +1100)
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>
arch/powerpc/kernel/prom.c

index b7634ce41dbc92bd67cd5ed1c6c7cd584924ccc4..09be2759c31445cd69c9026c37e3d808db87e26e 100644 (file)
@@ -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.