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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 21:32:27 +0000 (13:32 -0800)
commit0f543e6a6b01a50b1514ec3f9295aa62488a4bd7
tree6884928c883a2e8e6787726ed2b431b00017a024
parent5be594952c283412027639d60bc51116f64fdcbe
iio: adis16400: Set timestamp as the last element in chan_spec

commit c76782d151dab7ecfdcdf9a01561c2d61d9b490f upstream.

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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/adis16400.h
drivers/iio/imu/adis16400_core.c