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)
commit95ad67577de4ea08eb8e441394e698aa4addcc0b
tree69ebae7b5f9b7f354537e46f7887f98f0faf7b02
parente3ea4192d82480e1215280267746f51ce21db283
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: 0427a106a98a ("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