diff options
author | Urs Fässler <urs.fassler@bytesatwork.ch> | 2015-02-02 17:12:23 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-03-12 17:31:09 +0100 |
commit | 182830fede67ba3d9f6d52f68dca839bb2118b32 (patch) | |
tree | da008c8f515811a901449f7724ba781b06cd3552 /drivers/iio | |
parent | dac99fda24486fa218175047fad75cfa3b2234be (diff) |
iio: ad5686: fix optional reference voltage declaration
commit da019f59cb16570e78feaf10380ac65a3a06861e 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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/dac/ad5686.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index 57825ead7db2..7248147fbf2b 100644 --- a/drivers/iio/dac/ad5686.c +++ b/drivers/iio/dac/ad5686.c @@ -321,7 +321,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) |