summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2022-09-20 13:28:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 11:30:39 +0100
commit623ecc2a1025146ecbef51e44a49a8edf107b790 (patch)
tree7fa1c2e550c6bcb8759ba7f12722fc0de7cecc95 /kernel
parent19687799415b65dbbdadefc226c3e4be7edff178 (diff)
iio: adc: ad_sigma_delta: do not use internal iio_dev lock
commit 20228a1d5a55e7db0c6720840f2c7d2b48c55f69 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: af3008485ea0 ("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>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions