iio: adc: meson_saradc: do not use internal iio_dev lock
authorNuno Sá <nuno.sa@analog.com>
Tue, 4 Oct 2022 13:48:59 +0000 (15:48 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:43:58 +0000 (19:43 +0000)
commitd0c09264f1a64ba8435acfaa70380f61239fc0d4
tree3f7123399194ddb15c7d58e846b1019c5c4684a3
parentda8091f8acfa953ac55e2aa8d4218e49b18206a7
iio: adc: meson_saradc: do not use internal iio_dev lock

The iio_device lock is only meant for internal use. Hence define a
device local lock to protect against concurrent accesses.

While at it, properly include "mutex.h" for mutex related APIs.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20221004134909.1692021-7-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/meson_saradc.c