WSL2-Linux-Kernel/drivers/iio
Liam Beguin 9e97f6641c iio: inkern: make a best effort on offset calculation
commit ca85123354 upstream.

iio_convert_raw_to_processed_unlocked() assumes the offset is an
integer. Make a best effort to get a valid offset value for fractional
cases without breaking implicit truncations.

Fixes: 48e44ce0f8 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Reviewed-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-4-liambeguin@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:22:50 +02:00
..
accel iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
adc iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits 2022-03-02 11:48:03 +01:00
afe iio: afe: rescale: use s64 for temporary scale calculations 2022-04-08 14:22:50 +02:00
amplifiers
buffer
cdc
chemical
common
dac
dummy
frequency
gyro iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
health
humidity
imu iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
light iio: ltr501: Don't return error code in trigger handler 2021-12-14 10:57:21 +01:00
magnetometer iio: Fix error handling for PM 2022-03-02 11:48:04 +01:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure
proximity
resolver
temperature
test
trigger iio: trigger: stm32-timer: fix MODULE_ALIAS 2021-12-14 10:57:20 +01:00
Kconfig
Makefile
TODO
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: buffer: Fix file related error handling in IIO_BUFFER_GET_FD_IOCTL 2022-02-16 12:56:37 +01:00
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046 2022-01-27 11:02:57 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: make a best effort on offset calculation 2022-04-08 14:22:50 +02:00