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:
parent
adb729f677
commit
620636f497
@ -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, <c2688_regmap_bus, st,
|
||||
<c2688_regmap_config);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user