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>
This commit is contained in:
David Carlier
2026-04-10 20:37:37 +01:00
committed by Jonathan Cameron
parent be186094ee
commit 8eedc312f1

View File

@@ -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;