linux-stable/drivers/iio
Nuno Sá c8b577fe8d iio: adc: ad_sigma_delta: do not use internal iio_dev lock
commit 20228a1d5a upstream.

Drop 'mlock' usage by making use of iio_device_claim_direct_mode().
This change actually makes sure we cannot do a single conversion while
buffering is enable. Note there was a potential race in the previous
code since we were only acquiring the lock after checking if the bus is
enabled.

Fixes: af3008485e ("iio:adc: Add common code for ADI Sigma Delta devices")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: <Stable@vger.kernel.org> #No rush as race is very old.
Link: https://lore.kernel.org/r/20220920112821.975359-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-07 12:07:34 +01:00
..
accel iio: accel: mma8452: ignore the return value of reset operation 2022-07-02 16:17:15 +02:00
adc iio: adc: ad_sigma_delta: do not use internal iio_dev lock 2023-01-07 12:07:34 +01:00
amplifiers
buffer iio:buffer: make length types match kfifo types 2018-07-03 11:23:11 +02:00
chemical iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsius 2019-02-15 08:07:37 +01:00
common iio: ssp_sensors: fix error code in ssp_print_mcu_debug() 2021-10-27 09:33:58 +02:00
dac iio: dac: ad5593r: Fix i2c read protocol requirements 2022-10-26 13:15:36 +02:00
dummy iio: dummy: iio_simple_dummy: check the return value of kstrdup() 2022-06-14 16:52:39 +02:00
frequency iio: ad9523: Fix return value for ad952x_store() 2018-09-09 20:01:22 +02:00
gyro iio: itg3200: Call iio_trigger_notify_done() on error 2021-12-14 10:04:50 +01:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-12-08 11:15:40 +01:00
humidity iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:21:04 +02:00
imu iio: adis_buffer: do not return ints in irq handlers 2021-07-20 16:21:03 +02:00
light iio: light: apds9960: fix wrong register for gesture gain 2022-12-08 11:15:40 +01:00
magnetometer iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-12 12:14:54 +02:00
orientation
potentiometer
pressure iio: pressure: ms5611: changed hardcoded SPI speed to value limited 2022-11-25 17:35:41 +01:00
proximity iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-20 16:21:04 +02:00
temperature
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-11-25 17:35:41 +01:00
Kconfig
Makefile
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-29 13:45:07 +01:00
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-12-08 11:15:40 +01:00
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: inkern: only release the device node when done with it 2022-10-26 13:15:41 +02:00