summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/opal-sensor.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-03-28 16:33:33 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-04-07 10:34:27 +1000
commitbb4398e1de739a13e06589fc04cbb2267ba59800 (patch)
treef2e47b907f4b5275ee708988ca7899349424f4b7 /arch/powerpc/platforms/powernv/opal-sensor.c
parent32b941b79394435c1b6d688abfe762c5b3c82afa (diff)
downloadlinux-bb4398e1de739a13e06589fc04cbb2267ba59800.tar.gz
linux-bb4398e1de739a13e06589fc04cbb2267ba59800.tar.bz2
linux-bb4398e1de739a13e06589fc04cbb2267ba59800.zip
powerpc/powernv: Fix endian issues with OPAL async code
OPAL defines opal_msg as a big endian struct so we have to byte swap it on little endian builds. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-sensor.c')
-rw-r--r--arch/powerpc/platforms/powernv/opal-sensor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-sensor.c b/arch/powerpc/platforms/powernv/opal-sensor.c
index 663cc9c65613..7503e298c4c3 100644
--- a/arch/powerpc/platforms/powernv/opal-sensor.c
+++ b/arch/powerpc/platforms/powernv/opal-sensor.c
@@ -53,7 +53,7 @@ int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data)
goto out_token;
}
- ret = msg.params[1];
+ ret = be64_to_cpu(msg.params[1]);
out_token:
mutex_unlock(&opal_sensor_mutex);