Re: [PATCH 2/3] iio:kxcjk-1013: Fix endianness in scan_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/14/2014 01:38 PM, Peter Meerwald wrote:
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@xxxxxxxxxx>
Cc: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
---
  drivers/iio/accel/kxcjk-1013.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index a11588c..ea96170 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -466,7 +466,7 @@ static const struct attribute_group kxcjk1013_attrs_group = {
  		.realbits = 12,						\
  		.storagebits = 16,					\
  		.shift = 4,						\
-		.endianness = IIO_LE,					\
+		.endianness = IIO_CPU,					\
  	},								\
  }


Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux