iio: ad5686: fix optional reference voltage declaration
Subsystems (2)
PATCH 1/1 iio: ad5686: fix optional reference voltage declaration
When not using the "_optional" function, a dummy regulator is returned and the driver fails to initialize.
Signed-off-by Urs Fässler <[email protected]>
--- drivers/iio/dac/ad5686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5686.c +1 -0
@@ -322,7 +322,7 @@ static int ad5686_probe(struct spi_device *spi) st =iio_priv (indio_dev);spi_set_drvdata (spi, indio_dev); - st->reg =devm_regulator_get (&spi->dev,"vcc" ); + st->reg =devm_regulator_get_optional (&spi->dev,"vcc" );if (!IS_ERR (st->reg)) { ret =regulator_enable (st->reg);if (ret)
Signature · 1 line
2.1.4
Quoted 4 lines · Urs Fässler
When not using the "
_optional" function, a dummy regulator is returned and the driver fails to initialize.Signed-off-by Urs Fässler <[email protected]>
Thanks.
Added Jonathan to Cc.
Quoted 11 lines · Lars-Peter Clausen
Quoted 4 lines · Urs Fässler
When not using the "
_optional" function, a dummy regulator is returned and the driver fails to initialize.Signed-off-by Urs Fässler <[email protected]>Thanks.
Added Jonathan to Cc.
Applied to fixes-togreg (will hit git.kernel.org at the weekend as I am travelling, and Greg / Mainline after the merge window) Marked for stable.
Jonathan