提交 9e059bac 编写于 作者: M 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: NMark Brown <broonie@linaro.org>
Acked-by: NGuenter Roeck <linux@roeck-us.net>
上级 7d748971
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册