diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2013-10-30 17:47:07 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-31 05:37:27 +0400 |
commit | 563c5d8af5d56739bc31f9f4b1c8a0994ed5742c (patch) | |
tree | d7b660b3d0edbf0b589f46205392dfd778f4c533 /arch/powerpc/platforms/pseries | |
parent | 65f36f4149ce4490b2174ef45e1dbe494f4b8268 (diff) | |
download | linux-563c5d8af5d56739bc31f9f4b1c8a0994ed5742c.tar.xz |
powerpc/nvram: Fix endian issue when reading the NVRAM size
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r-- | arch/powerpc/platforms/pseries/nvram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 2498d4d801e8..057fc894be51 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c @@ -804,7 +804,7 @@ machine_arch_initcall(pseries, pseries_nvram_init_log_partitions); int __init pSeries_nvram_init(void) { struct device_node *nvram; - const unsigned int *nbytes_p; + const __be32 *nbytes_p; unsigned int proplen; nvram = of_find_node_by_type(NULL, "nvram"); @@ -817,7 +817,7 @@ int __init pSeries_nvram_init(void) return -EIO; } - nvram_size = *nbytes_p; + nvram_size = be32_to_cpup(nbytes_p); nvram_fetch = rtas_token("nvram-fetch"); nvram_store = rtas_token("nvram-store"); |