iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 13 Jun 2021 15:22:58 +0000 (16:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:45 +0000 (16:56 +0200)
commit8c85c0f8cbff0825f38ea631d3dff34e31c6573a
tree93ddbbe137c39c447044f399d651423d00cb2f73
parentc923e9effe50b0a83e74e1940afbecef5456bfda
iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()

[ Upstream commit b8f939fd20690623cb24845a563e7bc1e4a21482 ]

Add __aligned(8) to ensure the buffer passed to
iio_push_to_buffers_with_timestamp() is suitable for the naturally
aligned timestamp that will be inserted.

Here an explicit structure is not used, because this buffer is used in
a non-trivial way for data repacking.

Fixes: 121354b2eceb ("iio: magnetometer: Add driver support for PNI RM3100")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Song Qiang <songqiang1304521@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20210613152301.571002-6-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/magnetometer/rm3100-core.c