summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2013-12-11 18:45:00 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 20:25:08 (GMT)
commit432e0d6f5e63d49c1699cbe1a89e73a1bbb377d7 (patch)
treef0b887d9bf61c32d29f961e487343778be25f595 /drivers/iio
parent022fade9d15c8b62f79c5b650c8c9c2422c1108d (diff)
downloadlinux-fsl-qoriq-432e0d6f5e63d49c1699cbe1a89e73a1bbb377d7.tar.xz
iio:imu:adis16400 fix pressure channel scan type
commit 3425c0f7ac61f2fcfb7f2728e9b7ba7e27aec429 upstream. A single channel in this driver was using the IIO_ST macro. This does not provide a parameter for setting the endianness of the channel. Thus this channel will have been reported as whatever is the native endianness of the cpu rather than big endian. This means it would be incorrect on little endian platforms. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/imu/adis16400_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 3fb7757..368660d 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -651,7 +651,12 @@ static const struct iio_chan_spec adis16448_channels[] = {
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
.address = ADIS16448_BARO_OUT,
.scan_index = ADIS16400_SCAN_BARO,
- .scan_type = IIO_ST('s', 16, 16, 0),
+ .scan_type = {
+ .sign = 's',
+ .realbits = 16,
+ .storagebits = 16,
+ .endianness = IIO_BE,
+ },
},
ADIS16400_TEMP_CHAN(ADIS16448_TEMP_OUT, 12),
IIO_CHAN_SOFT_TIMESTAMP(11)