Skip to content

Commit

Permalink
iio: ad5686: fix optional reference voltage declaration
Browse files Browse the repository at this point in the history
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>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Urs Fässler authored and Jonathan Cameron committed Feb 4, 2015
1 parent 9e128ce commit da019f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/dac/ad5686.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit da019f5

Please sign in to comment.