mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-25 08:33:21 -04:00
iio: addac: ad74115: 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:
committed by
Jonathan Cameron
parent
be186094ee
commit
8eedc312f1
@@ -1835,7 +1835,10 @@ static int ad74115_probe(struct spi_device *spi)
|
||||
st = iio_priv(indio_dev);
|
||||
|
||||
st->spi = spi;
|
||||
mutex_init(&st->lock);
|
||||
ret = devm_mutex_init(dev, &st->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
init_completion(&st->adc_data_completion);
|
||||
|
||||
indio_dev->name = AD74115_NAME;
|
||||
|
||||
Reference in New Issue
Block a user