From: Axel Lin Date: Fri, 13 Apr 2012 13:35:05 +0000 (+0800) Subject: regulator: core: Fix getting input_uV when supplied by another regulator X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f24f5ada638dd07705bd83ebcc80044d587f374;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d4d34cbd34d9..713981b52f2a 100644 --- a/drivers/regulator/core.c +++ b/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)