diff options
author | Nuno Sá <nuno.sa@analog.com> | 2022-10-04 15:48:54 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-11-23 19:43:57 +0000 |
commit | 8f347c565df4e8dd2c862a48a3056bfe59d315e9 (patch) | |
tree | f3941011f26d4502acdaac206944417343c0c3e4 /drivers/iio/adc/ad7606.c | |
parent | 3a258747a01f1f21fd4c10a07499bde684f8ca2a (diff) | |
download | linux-stable-8f347c565df4e8dd2c862a48a3056bfe59d315e9.tar.gz linux-stable-8f347c565df4e8dd2c862a48a3056bfe59d315e9.tar.bz2 linux-stable-8f347c565df4e8dd2c862a48a3056bfe59d315e9.zip |
iio: adc: ad799x: do not use internal iio_dev lock
'mlock' was being grabbed when setting the device frequency. In order to
not introduce any functional change a new lock is added. With that in
mind, the lock also needs to be grabbed in the places where 'mlock' is
since it was also being used to protect st->config against the current
device state.
On the other places the lock was being used, we can just drop
it since we are only doing one i2c bus read/write which is already
safe.
While at it, properly include "mutex.h" for mutex related APIs.
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221004134909.1692021-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ad7606.c')
0 files changed, 0 insertions, 0 deletions