android_kernel_samsung_a7y1.../drivers/iio
Lars Möllendorf 32f4e64a55 iio: buffer: align the size of scan bytes to size of the largest element
commit 883f616530692d81cb70f8a32d85c0d2afc05f69 upstream.

Previous versions of `iio_compute_scan_bytes` only aligned each element
to its own length (i.e. its own natural alignment). Because multiple
consecutive sets of scan elements are buffered this does not work in
case the computed scan bytes do not align with the natural alignment of
the first scan element in the set.

This commit fixes this by aligning the scan bytes to the natural
alignment of the largest scan element in the set.

Fixes: 959d2952d124 ("staging:iio: make iio_sw_buffer_preenable much more general.")
Signed-off-by: Lars Möllendorf <lars.moellendorf@plating.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:45:04 +02:00
..
accel
adc
amplifiers
buffer
chemical
common
dac
frequency
gyro
humidity
imu
light
magnetometer
orientation
potentiometer
pressure
proximity
temperature
trigger
iio_core_trigger.h
iio_core.h
industrialio-buffer.c iio: buffer: align the size of scan bytes to size of the largest element 2020-04-07 13:45:04 +02:00
industrialio-core.c
industrialio-event.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile