diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-04-14 11:44:31 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 10:59:05 +0200 |
commit | c65416e73c6f648e608f86255de222839a8317e4 (patch) | |
tree | 865de1f27cad22e3d8dac1dfb56319e63f85235a /drivers | |
parent | 0bba339b64e4e38857940713ac3823e095bb97fc (diff) |
mmc: Check voltage only for regulators in use from consumer list
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/core.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 40fd150a13c..07db80ca4ee 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -200,11 +200,13 @@ static int regulator_check_consumers(struct regulator_dev *rdev, */ if (!regulator->min_uV && !regulator->max_uV) continue; - - if (*max_uV > regulator->max_uV) - *max_uV = regulator->max_uV; - if (*min_uV < regulator->min_uV) - *min_uV = regulator->min_uV; + + if (regulator->use) { + if (*max_uV > regulator->max_uV) + *max_uV = regulator->max_uV; + if (*min_uV < regulator->min_uV) + *min_uV = regulator->min_uV; + } } if (*min_uV > *max_uV) |