linux-stable/drivers/iio
Liam Beguin 6b23c33920 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 13:57:16 +02:00
..
accel iio: accel: mma8452: use the correct logic to get mma8452_data 2022-04-08 13:57:15 +02:00
adc iio: adc: xilinx-ams: Fixed wrong sequencer register settings 2022-04-08 13:57:15 +02:00
addac iio: addac: ad74413r: correct comparator gpio getters mask usage 2022-01-30 14:23:33 +00:00
afe iio: afe: rescale: use s64 for temporary scale calculations 2022-04-08 13:57:15 +02:00
amplifiers iio:amplifiers:hmc425a: Suppress clang W=1 warning about pointer to enum conversion. 2021-12-21 15:10:09 +00:00
buffer iio: buffer-dma: Use round_down() instead of rounddown() 2021-11-27 15:12:44 +00:00
cdc iio:cdc:ad7150: Fix use of uninitialized ret 2021-04-07 08:36:39 +01:00
chemical iio: chemical: sunrise_co2: set val parameter only on success 2021-12-28 18:37:41 +00:00
common iio/scmi: Add reading "raw" attribute. 2021-11-17 17:51:35 +00:00
dac iio:dac:mcp4725: Suppress clang W=1 warning about pointer to enum conversion. 2021-12-21 15:10:09 +00:00
dummy iio:dummy: Drop set but unused variable len. 2021-12-21 15:10:09 +00:00
filter iio:filter:admv8818: add support for ADMV8818 2021-12-16 17:34:28 +00:00
frequency iio: frequency: admv1013: remove the always true condition 2022-01-30 11:50:16 +00:00
gyro iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
health iio: afe4404: Remove no-op trigger ops 2021-11-17 17:51:37 +00:00
humidity iio: humidity: hdc100x: Add margin to the conversion time 2021-07-24 18:13:02 +01:00
imu iio: imu: st_lsm6dsx: use dev_to_iio_dev() to get iio_dev struct 2022-04-08 13:57:15 +02:00
light 1st set of IIO new device support, features and cleanup for 5.17 2021-12-22 12:33:01 +01:00
magnetometer iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
multiplexer iio: multiplexer: iio-mux: Support settle-time-us property 2021-10-21 20:02:54 +01:00
orientation iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
position iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
potentiometer iio:pot:mcp41010: Switch to generic firmware properties. 2021-12-12 17:12:47 +00:00
potentiostat iio: lmp91000: Remove no-op trigger ops 2021-11-17 17:51:38 +00:00
pressure More power management updates for 5.17-rc1 2022-01-18 09:13:30 +02:00
proximity iio: as3935: Remove unnecessary cast 2021-12-16 16:34:54 +00:00
resolver
temperature iio: temperature: Add MAX31865 RTD Support 2021-09-14 12:00:33 +01:00
test iio: test: Add test for IIO_VAL_INT_64. 2021-11-27 16:33:45 +00:00
trigger 1st set of IIO new device support, features and cleanup for 5.17 2021-12-22 12:33:01 +01:00
iio_core.h iio: Mark iio_device_type as const 2021-11-17 17:51:35 +00:00
iio_core_trigger.h
industrialio-buffer.c iio: buffer: Fix file related error handling in IIO_BUFFER_GET_FD_IOCTL 2022-02-11 12:13:22 +01:00
industrialio-configfs.c
industrialio-core.c iio: iio_device_alloc(): Remove unnecessary self drvdata 2021-12-16 11:44:10 +00:00
industrialio-event.c iio:event: Add timeout event info type 2021-04-07 08:36:36 +01:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c 1st set of IIO new device support, features and cleanup for 5.17 2021-12-22 12:33:01 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c iio: inkern: make a best effort on offset calculation 2022-04-08 13:57:16 +02:00
Kconfig iio: add filter subfolder 2021-12-16 17:29:46 +00:00
Makefile iio: add filter subfolder 2021-12-16 17:29:46 +00:00
TODO