projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6166317
)
regulator: core: Properly handle the case min_uV < rdev->desc->min_uV in map_voltage_...
author
Axel Lin
<axel.lin@gmail.com>
Thu, 7 Jun 2012 01:52:12 +0000
(09:52 +0800)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Thu, 7 Jun 2012 23:15:55 +0000
(07:15 +0800)
Properly handle the case if the specified min_uV is less than the voltage given
by the lowest selector.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/core.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index 7584a74eec8a4f7706a59e9013e40bab34d30ef8..09a737c868b573227d22226926a081f35a29e6b2 100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-2050,6
+2050,9
@@
int regulator_map_voltage_linear(struct regulator_dev *rdev,
return -EINVAL;
}
+ if (min_uV < rdev->desc->min_uV)
+ min_uV = rdev->desc->min_uV;
+
ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step);
if (ret < 0)
return ret;