]> git.karo-electronics.de Git - linux-beck.git/commitdiff
hwmon: (sht15) Use devm_regulator_get_optional()
authorMark Brown <broonie@linaro.org>
Sun, 18 Aug 2013 16:35:52 +0000 (17:35 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 19 Aug 2013 09:47:15 +0000 (10:47 +0100)
Since the sht15 driver supports operation without an external vref
regulator the driver should use the new devm_regulator_get_optional() to
indicate that a stub regulator should not be provided.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/sht15.c

index 2507f902fb7aa4ea450079a69bbbf8234e7e0ef4..ab5dc3af4cfb3785c92e5095cc3c0be54c30273c 100644 (file)
@@ -957,7 +957,7 @@ static int sht15_probe(struct platform_device *pdev)
         * If a regulator is available,
         * query what the supply voltage actually is!
         */
-       data->reg = devm_regulator_get(data->dev, "vcc");
+       data->reg = devm_regulator_get_optional(data->dev, "vcc");
        if (!IS_ERR(data->reg)) {
                int voltage;