]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 1 May 2021 17:01:08 +0000 (18:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:00:10 +0000 (17:00 +0200)
commit1d9a4060b612ec7920cf0ad45d24cd554e4d34a9
tree86fc478b2278b5723bc80cd2d2dacc94745d2d89
parente0c181b7d0686173a8aaf2e48e460233c76990aa
iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()

[ Upstream commit f40a71ffec808e7e51848f63f0c0d3c32d65081b ]

To make code more readable, use a structure to express the channel
layout and ensure the timestamp is 8 byte aligned.

Found during an audit of all calls of this function.

Fixes: 95c12bba51c3 ("iio: accel: Add buffer mode for Sensortek STK8312")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210501170121.512209-7-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/accel/stk8312.c