Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;