]> git.proxmox.com Git - mirror_ubuntu-focal-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:46:04 +0000 (09:46 +0200)
commitf55206a9e754a1f6604c4914d746cf9d31f01bea
treeb34d2b108efef08d6f69d60cf0aef9aa4379e54b
parent43f5cd2e552a27296a8ee44354daff42df483d7f
iio: magn: bmc150: Fix buffer alignment in iio_push_to_buffers_with_timestamp()

BugLink: https://bugs.launchpad.net/bugs/1938199
[ 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