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 20:41:27 +0000 (12:41 -0800)
commit016085b4fe767ae73637585369104058493ffd72
treeb5d2f67b0a0fb8df81b3763dc0920e809ed398f2
parent39779455a6a08341985427784b88a50c6b5cad58
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