浏览代码

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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin 13 年之前
父节点
当前提交
3f24f5ada6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/regulator/core.c

+ 1 - 1
drivers/regulator/core.c

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