]> git.baikalelectronics.ru Git - kernel.git/commit
iio: accel: kxsd9: Fix alignment of local buffer.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 22 Jul 2020 15:50:37 +0000 (16:50 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 Aug 2020 10:38:47 +0000 (11:38 +0100)
commitffc8c22e2e4a3283c2962203f8a5c7558d7ff0e8
tree69ebae7b5f9b7f354537e46f7887f98f0faf7b02
parent3bd8cd41b87d26733e75e8686b56d6c731f834f0
iio: accel: kxsd9: Fix alignment of local buffer.

iio_push_to_buffers_with_timestamp assumes 8 byte alignment which
is not guaranteed by an array of smaller elements.

Note that whilst in this particular case the alignment forcing
of the ts element is not strictly necessary it acts as good
documentation.  Doing this where not necessary should cut
down on the number of cut and paste introduced errors elsewhere.

Fixes: d8c4f4c36f46 ("iio: accel: kxsd9: Add triggered buffer handling")
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: <Stable@vger.kernel.org>
drivers/iio/accel/kxsd9.c