]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iio:kxcjk-1013: Fix endianness in scan_type
authorPeter Meerwald <pmeerw@pmeerw.net>
Mon, 14 Jul 2014 20:38:00 +0000 (21:38 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 20 Jul 2014 16:52:15 +0000 (17:52 +0100)
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 <pmeerw@pmeerw.net>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/kxcjk-1013.c

index eb8a3229a9d690c34aa8ac47a16e9c0f951f180d..7941cf2d31eec0783031fb304843614ed0911726 100644 (file)
@@ -453,7 +453,7 @@ static const struct attribute_group kxcjk1013_attrs_group = {
                .realbits = 12,                                         \
                .storagebits = 16,                                      \
                .shift = 4,                                             \
-               .endianness = IIO_LE,                                   \
+               .endianness = IIO_CPU,                                  \
        },                                                              \
 }