iio: dac: ad5686: 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:35 +01:00 committed by Jonathan Cameron
parent e7394ce0e5
commit 81227f33a8

View File

@ -494,7 +494,9 @@ int ad5686_probe(struct device *dev,
indio_dev->channels = st->chip_info->channels;
indio_dev->num_channels = st->chip_info->num_channels;
mutex_init(&st->lock);
ret = devm_mutex_init(dev, &st->lock);
if (ret)
return ret;
switch (st->chip_info->regmap_type) {
case AD5310_REGMAP: