diff options
| author | Axel Lin <axel.lin@ingics.com> | 2014-05-24 11:10:43 +0800 | 
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-05-26 14:36:55 +0100 | 
| commit | 366986274c548261c42d5ca24391cb4eef3008c2 (patch) | |
| tree | 4e328756fb2e6220c8f4c1f91caebd543579e475 | |
| parent | 9f8c0fe9542141fd0008d5c0f6ae365890f6da94 (diff) | |
| download | talos-op-linux-366986274c548261c42d5ca24391cb4eef3008c2.tar.gz talos-op-linux-366986274c548261c42d5ca24391cb4eef3008c2.zip | |
regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range
Use map_voltage_linear_range() if list_voltage_linear_range() is in use and
nothing is set.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
| -rw-r--r-- | drivers/regulator/core.c | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ba28d29b66d2..476661117930 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2322,6 +2322,10 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,  			    regulator_list_voltage_linear)  				ret = regulator_map_voltage_linear(rdev,  								min_uV, max_uV); +			else if (rdev->desc->ops->list_voltage == +				 regulator_list_voltage_linear_range) +				ret = regulator_map_voltage_linear_range(rdev, +								min_uV, max_uV);  			else  				ret = regulator_map_voltage_iterate(rdev,  								min_uV, max_uV); | 

