Commit 9e059bac authored by Mark Brown's avatar Mark Brown

hwmon: (sht15) Use devm_regulator_get_optional()

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: default avatarMark Brown <broonie@linaro.org>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 7d748971
...@@ -957,7 +957,7 @@ static int sht15_probe(struct platform_device *pdev) ...@@ -957,7 +957,7 @@ static int sht15_probe(struct platform_device *pdev)
* If a regulator is available, * If a regulator is available,
* query what the supply voltage actually is! * 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)) { if (!IS_ERR(data->reg)) {
int voltage; int voltage;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment