diff options
author | Anton Blanchard <anton@samba.org> | 2014-03-28 09:33:33 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-04-07 04:34:27 +0400 |
commit | bb4398e1de739a13e06589fc04cbb2267ba59800 (patch) | |
tree | f2e47b907f4b5275ee708988ca7899349424f4b7 /arch/powerpc/platforms/powernv/opal-sensor.c | |
parent | 32b941b79394435c1b6d688abfe762c5b3c82afa (diff) | |
download | linux-bb4398e1de739a13e06589fc04cbb2267ba59800.tar.xz |
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.c | 2 |
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); |