mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
iio: dac: ad5755: 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
b8c15f8589
commit
e7394ce0e5
@@ -827,8 +827,9 @@ static int ad5755_probe(struct spi_device *spi)
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->num_channels = AD5755_NUM_CHANNELS;
|
||||
|
||||
mutex_init(&st->lock);
|
||||
|
||||
ret = devm_mutex_init(&spi->dev, &st->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pdata = ad5755_parse_fw(&spi->dev);
|
||||
if (!pdata) {
|
||||
|
||||
Reference in New Issue
Block a user