summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2025-11-04 15:35:13 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-11-09 16:16:29 +0000
commit6e43c10675d876a5fb71e57a9bcca9533fccccd9 (patch)
treeaddffa18c6912d2cd39ccfe03390523051e6a4bb /drivers/iio
parent876d94024087b03494b206a5b5561fcd267824e7 (diff)
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/dac/ad5446.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index c7876217c7ec..59e1f67ef334 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -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;