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>
Tue, 20 Jul 2021 14:21:03 +0000 (16:21 +0200)
commitad36a41bb4b2e753605cd09dcf350f680dfbbbfc
tree938f325b945c558092d079e4685f9e043690b364
parent7cc4c2e2e5be85b3640d24da33111515cfc2d4ac
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