1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00

iio: dac: ltc2688: make use of devm_mutex_init()

Use devm_mutex_init() since it brings some benefits when
CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Nuno Sá 2025-09-23 09:41:47 +01:00 committed by Jonathan Cameron
parent adb729f677
commit 620636f497

View File

@ -953,7 +953,9 @@ static int ltc2688_probe(struct spi_device *spi)
/* Just write this once. No need to do it in every regmap read. */
st->tx_data[3] = LTC2688_CMD_NOOP;
mutex_init(&st->lock);
ret = devm_mutex_init(dev, &st->lock);
if (ret)
return ret;
st->regmap = devm_regmap_init(dev, &ltc2688_regmap_bus, st,
&ltc2688_regmap_config);