diff options
| author | David Carlier <devnexen@gmail.com> | 2026-04-10 20:37:37 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-27 09:58:22 +0100 |
| commit | 8eedc312f1a1ac69ff322e846bb5d58362017945 (patch) | |
| tree | 09ceaea15a3fe1528a585e829bcf3df198742549 | |
| parent | be186094ee51c26bfb0e8cd6a46286e7e413abe7 (diff) | |
| download | linux-8eedc312f1a1ac69ff322e846bb5d58362017945.tar.gz linux-8eedc312f1a1ac69ff322e846bb5d58362017945.zip | |
iio: addac: ad74115: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| -rw-r--r-- | drivers/iio/addac/ad74115.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iio/addac/ad74115.c b/drivers/iio/addac/ad74115.c index f8b04d86b01f..41e0b1d334cc 100644 --- a/drivers/iio/addac/ad74115.c +++ b/drivers/iio/addac/ad74115.c @@ -1835,7 +1835,10 @@ static int ad74115_probe(struct spi_device *spi) st = iio_priv(indio_dev); st->spi = spi; - mutex_init(&st->lock); + ret = devm_mutex_init(dev, &st->lock); + if (ret) + return ret; + init_completion(&st->adc_data_completion); indio_dev->name = AD74115_NAME; |
