linux-stable/drivers/iio
Liam Beguin ca85123354 iio: inkern: make a best effort on offset calculation
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>
2022-01-30 14:38:03 +00:00
..
accel iio: st_sensors: don't always auto-enable I2C and SPI interface drivers 2022-01-23 18:03:35 +00:00
adc iio: adc: qcom-vadc-common: Re-use generic struct u32_fract 2022-01-30 12:21:25 +00:00
addac iio:addac:ad74413r: Fix uninitialized ret in a path that won't be hit. 2021-12-21 15:10:10 +00:00
afe iio: afe: iio-rescale: Support processed channels 2021-06-03 18:24:13 +01: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: hw_consumer: Use struct_size() helper in kzalloc() 2022-01-23 18:03:37 +00:00
cdc iio:cdc:ad7150: Fix use of uninitialized ret 2021-04-07 08:36:39 +01:00
chemical iio: sps30: Use sysfs_emit() 2022-01-23 18:03:37 +00:00
common iio: ms_sensors: Use sysfs_emit() 2022-01-23 18:03:36 +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: ad9523: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
gyro iio: st_sensors: don't always auto-enable I2C and SPI interface drivers 2022-01-23 18:03:35 +00:00
health iio: afe4404: Remove no-op trigger ops 2021-11-17 17:51:37 +00:00
humidity iio: humidity: hdc100x: Add ACPI HID table 2022-01-30 13:44:53 +00:00
imu iio: adis: stylistic changes 2022-01-23 18:03:37 +00:00
light iio: lm3533: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
magnetometer iio: st_sensors: don't always auto-enable I2C and SPI interface drivers 2022-01-23 18:03:35 +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 iio: pressure: dps310: Add ACPI HID table 2022-01-30 12:55:11 +00:00
proximity iio: sx9360: fix iio event generation 2022-01-30 12:39:16 +00:00
resolver
temperature iio: max31865: Use sysfs_emit() 2022-01-23 18:03:36 +00: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 iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
industrialio-buffer.c iio: core: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
industrialio-configfs.c
industrialio-core.c iio: core: Use sysfs_emit() 2022-01-23 18:03:36 +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-01-30 14:38:03 +00: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