]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iio: magn: bmc150: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 1 May 2021 17:01:18 +0000 (18:01 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:31:14 +0000 (09:31 +0200)
commitc9129e32957687c82caddae6b6aadc96e13f93bf
tree44c940a1f05b63e8d44f63a80ce97ec735542cc8
parent97881a1a96316da130ea7bcfe8c5227cd27203c8
iio: magn: bmc150: Fix buffer alignment in iio_push_to_buffers_with_timestamp()

BugLink: https://bugs.launchpad.net/bugs/1938340
[ Upstream commit 7692088f72865c41b6b531fd09486ee99a5da930 ]

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 uses of
iio_push_to_buffers_with_timestamp()

Fixes: c91746a2361d ("iio: magn: Add support for BMC150 magnetometer")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Stephan Gerhold <stephan@gerhold.net>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210501170121.512209-17-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/iio/magnetometer/bmc150_magn.c