All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] hwmon: (sht15) Use devm_regulator_get_optional()
@ 2013-08-18 16:43 Mark Brown
  2013-08-19  2:44 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-08-18 16:43 UTC (permalink / raw)
  To: lm-sensors

From: Mark Brown <broonie@linaro.org>

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>
---

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(-)

diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 883d291..97cd45a 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -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;
 
-- 
1.8.4.rc2


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-19  2:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18 16:43 [lm-sensors] [PATCH] hwmon: (sht15) Use devm_regulator_get_optional() Mark Brown
2013-08-19  2:44 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.