iio: dac: ad5446: Make use of devm_mutex_init()

Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Nuno Sá
2025-11-04 15:35:13 +00:00
committed by Jonathan Cameron
parent 876d940240
commit 6e43c10675

View File

@@ -184,7 +184,9 @@ int ad5446_probe(struct device *dev, const char *name,
indio_dev->channels = &st->chip_info->channel;
indio_dev->num_channels = 1;
mutex_init(&st->lock);
ret = devm_mutex_init(dev, &st->lock);
if (ret)
return ret;
st->pwr_down_mode = MODE_PWRDWN_1k;