summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-01 20:13:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-20 17:15:54 +0300
commit51ef21934d1cc8e8af434a3d8429baeb41a4a91f (patch)
tree7d31864f4a71a7898ec6d03d1dc4dfc561c839fa /drivers/iio
parentf3a5bf2b0bf9062b8ac35de522776da85e6a5622 (diff)
downloadlinux-51ef21934d1cc8e8af434a3d8429baeb41a4a91f.tar.xz
iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
[ Upstream commit 8979b67ec61abc232636400ee8c758a16a73c95f ] 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 structure is not used, because this buffer is also used elsewhere in the driver. Fixes: 67e17300dc1d ("iio: potentiostat: add LMP91000 support") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Matt Ranostay <matt.ranostay@konsulko.com> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Link: https://lore.kernel.org/r/20210501171352.512953-8-jic23@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/potentiostat/lmp91000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index 90e895adf997..68f4f6fa27da 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -71,8 +71,8 @@ struct lmp91000_data {
struct completion completion;
u8 chan_select;
-
- u32 buffer[4]; /* 64-bit data + 64-bit timestamp */
+ /* 64-bit data + 64-bit naturally aligned timestamp */
+ u32 buffer[4] __aligned(8);
};
static const struct iio_chan_spec lmp91000_channels[] = {