mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
iio: dac: ad3552r: 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
6cc18c0dc2
commit
e15c8934e6
|
|
@ -628,7 +628,9 @@ static int ad3552r_probe(struct spi_device *spi)
|
|||
if (!dac->model_data)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_init(&dac->lock);
|
||||
err = devm_mutex_init(&spi->dev, &dac->lock);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = ad3552r_init(dac);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user