Skip to content

Commit 328499b

Browse files
ursbatwsashalevin
authored andcommitted
iio: ad5686: fix optional reference voltage declaration
commit da019f5 upstream. When not using the "_optional" function, a dummy regulator is returned and the driver fails to initialize. Signed-off-by: Urs Fässler <urs.fassler@bytesatwork.ch> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
1 parent 30fa0db commit 328499b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/iio/dac/ad5686.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int ad5686_probe(struct spi_device *spi)
322322
st = iio_priv(indio_dev);
323323
spi_set_drvdata(spi, indio_dev);
324324

325-
st->reg = devm_regulator_get(&spi->dev, "vcc");
325+
st->reg = devm_regulator_get_optional(&spi->dev, "vcc");
326326
if (!IS_ERR(st->reg)) {
327327
ret = regulator_enable(st->reg);
328328
if (ret)

0 commit comments

Comments
 (0)