iio: dac: ltc2664: 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:36 +01:00 committed by Jonathan Cameron
parent 81227f33a8
commit be186094ee

View File

@ -675,7 +675,9 @@ static int ltc2664_probe(struct spi_device *spi)
st->chip_info = chip_info;
mutex_init(&st->lock);
ret = devm_mutex_init(dev, &st->lock);
if (ret)
return ret;
st->regmap = devm_regmap_init_spi(spi, &ltc2664_regmap_config);
if (IS_ERR(st->regmap))