diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2015-04-13 17:40:48 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-04-26 20:39:42 +0200 |
commit | cd62322a9767f9a0bcf855123c478187e38a10f4 (patch) | |
tree | 436f350ed4fa9d57fa42a1320234b0c47875058b /net/switchdev/Kconfig | |
parent | iio:st_sensors: Fix oops when probing SPI devices (diff) | |
download | linux-cd62322a9767f9a0bcf855123c478187e38a10f4.tar.xz linux-cd62322a9767f9a0bcf855123c478187e38a10f4.zip |
iio: accel: mma9553: fix endianness issue when reading status
Refactor code for simplicity and clarity.
This also fixes an endianness issue with the original code.
When reading multiple registers, the received buffer of
16-bytes words is little endian (status, step count). On
big endian machines, casting them to u32 would result in
reversed order in the buffer (step count, status) leading
to incorrect values for step count and activity.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions