Skip to content

Commit

Permalink
hwmon: (sht15) Use devm_regulator_get_optional()
Browse files Browse the repository at this point in the history
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>
Acked-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Mark Brown committed Aug 19, 2013
1 parent 7d74897 commit 9e059ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/sht15.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9e059ba

Please sign in to comment.