Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189900
b: refs/heads/master
c: c7a78d2
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare committed Apr 14, 2010
1 parent 5dfd0a4 commit 238ac09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 328a2c22abd08911e37fa66f1358f829cecd72e9
refs/heads/master: c7a78d2c2e2537fd24903e966f34aae50319d587
7 changes: 6 additions & 1 deletion trunk/drivers/hwmon/sht15.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,12 @@ static int __devinit sht15_probe(struct platform_device *pdev)
/* If a regulator is available, query what the supply voltage actually is!*/
data->reg = regulator_get(data->dev, "vcc");
if (!IS_ERR(data->reg)) {
data->supply_uV = regulator_get_voltage(data->reg);
int voltage;

voltage = regulator_get_voltage(data->reg);
if (voltage)
data->supply_uV = voltage;

regulator_enable(data->reg);
/* setup a notifier block to update this if another device
* causes the voltage to change */
Expand Down

0 comments on commit 238ac09

Please sign in to comment.