Commit 8979b67e authored by Jonathan Cameron's avatar Jonathan Cameron

iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()

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: 67e17300 ("iio: potentiostat: add LMP91000 support")
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Acked-by: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20210501171352.512953-8-jic23@kernel.org
parent 8dea228b
...@@ -71,8 +71,8 @@ struct lmp91000_data { ...@@ -71,8 +71,8 @@ struct lmp91000_data {
struct completion completion; struct completion completion;
u8 chan_select; u8 chan_select;
/* 64-bit data + 64-bit naturally aligned timestamp */
u32 buffer[4]; /* 64-bit data + 64-bit timestamp */ u32 buffer[4] __aligned(8);
}; };
static const struct iio_chan_spec lmp91000_channels[] = { static const struct iio_chan_spec lmp91000_channels[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment