diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-07-21 23:22:35 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-21 23:22:35 +0200 |
commit | 2d05bf6ef7391ac3642ab62bc3a649fdb32731fe (patch) | |
tree | a8671f0eafa885b4f3ad05204e3ed642b6acab59 /drivers/regulator | |
parent | 9c63cd5a955ce8a3de1776a9e4b6b89c69b2a09e (diff) | |
parent | 8c0383b8f6a8012b107cd62eaa5a556586d8ea56 (diff) |
Merge branch 'samsung/defconfig' into next/defconfig
From Kukjin Kim <kgene.kim@samsung.com>:
It is including new exynos_defconfig for DT configuration of exynos4
and exynos5 together. The old exynos4_defconfig will be used for non-DT
for a while and we will try to move on using exynos_defconfig for only DT.
* samsung/defconfig:
ARM: exynos_defconfig: enable more platforms in defconfig
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 09a737c868b5..8b4b3829d9e7 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2519,9 +2519,12 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load) { struct regulator_dev *rdev = regulator->rdev; struct regulator *consumer; - int ret, output_uV, input_uV, total_uA_load = 0; + int ret, output_uV, input_uV = 0, total_uA_load = 0; unsigned int mode; + if (rdev->supply) + input_uV = regulator_get_voltage(rdev->supply); + mutex_lock(&rdev->mutex); /* @@ -2554,10 +2557,7 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load) goto out; } - /* get input voltage */ - input_uV = 0; - if (rdev->supply) - input_uV = regulator_get_voltage(rdev->supply); + /* No supply? Use constraint voltage */ if (input_uV <= 0) input_uV = rdev->constraints->input_uV; if (input_uV <= 0) { |