iio: adis16400: Set timestamp as the last element in chan_spec
authorMarcus Folkesson <marcus.folkesson@gmail.com>
Fri, 24 Jan 2014 11:24:00 +0000 (11:24 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 8 Feb 2014 11:26:06 +0000 (11:26 +0000)
commitc76782d151dab7ecfdcdf9a01561c2d61d9b490f
tree222af39a5e74e699001ffaad38b6283c7b603ef7
parentbef44abccb2677e8d16e50b75316d4fd1061be81
iio: adis16400: Set timestamp as the last element in chan_spec

This is necessary since timestamp is calculated as the last element
in iio_compute_scan_bytes().

Without this fix any userspace code reading the layout of the buffer via
sysfs will incorrectly interpret the data leading some nasty corruption.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/adis16400.h
drivers/iio/imu/adis16400_core.c