diff options
| author | David Carlier <devnexen@gmail.com> | 2026-04-10 20:37:34 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-27 09:58:22 +0100 |
| commit | e7394ce0e5bb7fe86b8f9b3ceabf197ff40287a8 (patch) | |
| tree | 0ff90b759c5b4dac8804293e348eecfbf9507a50 | |
| parent | b8c15f8589e6a716e5141ef87c742a542553ed65 (diff) | |
| download | linux-e7394ce0e5bb7fe86b8f9b3ceabf197ff40287a8.tar.gz linux-e7394ce0e5bb7fe86b8f9b3ceabf197ff40287a8.zip | |
iio: dac: ad5755: 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>
| -rw-r--r-- | drivers/iio/dac/ad5755.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c index d0e5f35462b1..cc6d56140d66 100644 --- a/drivers/iio/dac/ad5755.c +++ b/drivers/iio/dac/ad5755.c @@ -827,8 +827,9 @@ static int ad5755_probe(struct spi_device *spi) indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->num_channels = AD5755_NUM_CHANNELS; - mutex_init(&st->lock); - + ret = devm_mutex_init(&spi->dev, &st->lock); + if (ret) + return ret; pdata = ad5755_parse_fw(&spi->dev); if (!pdata) { |
