mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
iio: dac: ad7303: 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>
This commit is contained in:
parent
e15c8934e6
commit
de960173ae
|
|
@ -218,7 +218,9 @@ static int ad7303_probe(struct spi_device *spi)
|
|||
|
||||
st->spi = spi;
|
||||
|
||||
mutex_init(&st->lock);
|
||||
ret = devm_mutex_init(&spi->dev, &st->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
st->vdd_reg = devm_regulator_get(&spi->dev, "Vdd");
|
||||
if (IS_ERR(st->vdd_reg))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user