mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02: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:
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user