iio: ad5686: fix optional reference voltage declaration
authorUrs Fässler <urs.fassler@bytesatwork.ch>
Mon, 2 Feb 2015 16:12:23 +0000 (17:12 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 4 Feb 2015 16:54:38 +0000 (16:54 +0000)
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>
drivers/iio/dac/ad5686.c

index f57562aa396f44462a9fdc822741d09bf37531f4..15c73e20272d874655e544366e2a8d6f1c24912a 100644 (file)
@@ -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)
This page took 0.03641 seconds and 5 git commands to generate.