]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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:34:51 +0000 (13:34 -0800)
commitdceb7b647a838eac1a64f962baa429e0eeb8cb23
tree8443cc325328b35b931f81305d061026fad8aa96
parent45a77a9faa9f7d0da102ad224bf669a2a21a4cda
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