android_kernel_xiaomi_sm7250/drivers/iio
Lars Möllendorf e5d1fe9448 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: 959d2952d1 ("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-01-23 08:21:27 +01:00
..
accel iio: fix center temperature of bmc150-accel-core 2019-11-06 13:05:40 +01:00
adc iio: adc: max9611: Fix too short conversion time delay 2020-01-09 10:18:55 +01:00
afe
amplifiers
buffer
chemical iio:chemical:bme680: Fix SPI read interface 2019-04-27 09:36:34 +02:00
common iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data 2019-05-31 06:46:25 -07:00
counter
dac iio: dac: ad5446: Add support for new AD5600 DAC 2019-12-31 16:36:00 +01:00
dummy
frequency Merge branch 'fixes-togreg' into togreg 2018-08-01 18:56:17 +01:00
gyro iio/gyro/bmg160: Use millidegrees for temperature scale 2019-04-27 09:36:34 +02:00
health
humidity iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting 2019-12-17 20:34:37 +01:00
imu iio: imu: adis16480: assign bias value only if operation succeeded 2020-01-17 19:47:05 +01:00
light iio: light: bh1750: Resolve compiler warning and make code more readable 2019-12-31 16:34:48 +01:00
magnetometer iio: hmc5843: fix potential NULL pointer dereferences 2019-05-31 06:46:25 -07:00
multiplexer
orientation iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
potentiometer
potentiostat
pressure iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
proximity iio: srf04: fix wrong limitation in distance measuring 2019-11-12 19:20:40 +01:00
resolver
temperature iio: temperature: mlx90632 Relax the compatibility check 2019-06-25 11:35:54 +08:00
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-01-23 08:21:27 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: fix a possible circular locking dependency 2019-04-27 09:36:35 +02:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile