iio: dac: ad7303: 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:32 +01:00 committed by Jonathan Cameron
parent e15c8934e6
commit de960173ae

View File

@ -218,7 +218,9 @@ static int ad7303_probe(struct spi_device *spi)
st->spi = spi;
mutex_init(&st->lock);
ret = devm_mutex_init(&spi->dev, &st->lock);
if (ret)
return ret;
st->vdd_reg = devm_regulator_get(&spi->dev, "Vdd");
if (IS_ERR(st->vdd_reg))