From: Peter Meerwald Date: Mon, 14 Jul 2014 20:38:00 +0000 (+0100) Subject: iio:kxcjk-1013: Fix endianness in scan_type X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f4e2f94d8c1057154728eff974c8ce8688e1ea2d;p=linux-beck.git iio:kxcjk-1013: Fix endianness in scan_type driver uses i2c_smbus_read_word_data() to the data in the trigger handler and hence already does endianness conversion; the I2C chip has data in little endian, but the value is provides in CPU endianness Signed-off-by: Peter Meerwald Reviewed-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index eb8a3229a9d6..7941cf2d31ee 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -453,7 +453,7 @@ static const struct attribute_group kxcjk1013_attrs_group = { .realbits = 12, \ .storagebits = 16, \ .shift = 4, \ - .endianness = IIO_LE, \ + .endianness = IIO_CPU, \ }, \ }