Skip to contentSkip to conversation

regulator: core: Fix getting input_uV when supplied by another regulator

PATCH Applied Axel Lin 2 participants 2 messages Apr 13, 2012 – Apr 16, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: core: Fix getting input_uV when supplied by another regulator

When supplied by another regulator, returns the supply regulator's output voltage for inpu_uV.

---
 drivers/regulator/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/core.c +1 -1
index 4e34cd3..a8d4360 100644
@@ -649,7 +649,7 @@ static void drms_uA_update(struct regulator_dev *rdev)
 	/* get input voltage */
 	input_uV = 0;
 	if (rdev->supply)
-		input_uV = _regulator_get_voltage(rdev);
+		input_uV = regulator_get_voltage(rdev->supply);
 	if (input_uV <= 0)
 		input_uV = rdev->constraints->input_uV;
 	if (input_uV <= 0)
Signature · 1 line
1.7.5.4