]> git.baikalelectronics.ru Git - kernel.git/commit
iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot()
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Mon, 1 Jan 2018 18:54:42 +0000 (19:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:03:43 +0000 (16:03 +0100)
commit3d4d50842a3496259c7b829aa88f694bf0cea64a
tree7f781a24dcfb0b71638cf5ba748bbe1466eb0c32
parent91a3735d146759d3404ee7a94b8f2136b9e0f931
iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot()

Apply le16_to_cpu() to data read from the sensor in order to take into
account architecture endianness

Fixes: 98d8c8774fe4 (iio: imu: add support to lsm6dsx driver)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c