]> git.baikalelectronics.ru Git - kernel.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 14:53:38 +0000 (16:53 +0200)
commit1aa41baedb82e5f8f1273601bb217eb330300798
tree93a0e5c67538d81594e8b4ae8cfc2fe1f82e7294
parented8de72c45f548a371bae8671cc764911504f603
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: c6668d79b237 ("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