Skip to contentSkip to conversation

hwmon: (sht15) Use devm_regulator_get_optional()

PATCH In review Mark Brown 2 participants 2 messages Aug 18, 2013 – Aug 19, 2013 Hardware monitoring

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 hwmon: (sht15) Use devm_regulator_get_optional()

From: Mark Brown <[email protected]>

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.

---

Since devm_regulator_get_optional() is not yet merged either the branch adding it would need be be merged into the hwmon tree or I'd need to apply this to the regualtor tree.

 drivers/hwmon/sht15.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/sht15.c +1 -1
index 883d291..97cd45a 100644
@@ -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;
 
Signature · 7 lines
1.8.4.rc2


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Mark Brown

From: Mark Brown <[email protected]>

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.

Quoted 6 lines

---

Since devm_regulator_get_optional() is not yet merged either the branch adding it would need be be merged into the hwmon tree or I'd need to apply this to the regualtor tree.

Please take it through the regulator tree; that seems to be easier.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors