diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-24 11:29:58 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-24 11:29:58 +0000 |
commit | 511f1cb6d426938fabf9c6d69ce4861b66ffd919 (patch) | |
tree | 88fd9b5c15ccb42d5d582f83e87ce5d3f16127cb /drivers/regulator/wm8400-regulator.c | |
parent | f907ab06bb021bcb91d39c8d1b36536ebdb318fa (diff) | |
parent | 4992fa1fd425f1934f503ffa96b68e235b89db9a (diff) |
Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into next/drivers
The pxa regulator branch removes the bq24022 driver, while a lot of
other regulator drivers got added in the regulator tree. This
resolves the trivial conflicts by merging in the regulator patches
that are already merged into v3.4.
Conflicts:
drivers/regulator/Kconfig
drivers/regulator/Makefile
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/regulator/wm8400-regulator.c')
-rw-r--r-- | drivers/regulator/wm8400-regulator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index 706f39563a7..8477153780b 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c @@ -78,14 +78,14 @@ static int wm8400_ldo_set_voltage(struct regulator_dev *dev, if (min_uV < 1700000) { /* Steps of 50mV from 900mV; */ - val = (min_uV - 850001) / 50000; + val = DIV_ROUND_UP(min_uV - 900000, 50000); if ((val * 50000) + 900000 > max_uV) return -EINVAL; BUG_ON((val * 50000) + 900000 < min_uV); } else { /* Steps of 100mV from 1700mV */ - val = ((min_uV - 1600001) / 100000); + val = DIV_ROUND_UP(min_uV - 1700000, 100000); if ((val * 100000) + 1700000 > max_uV) return -EINVAL; @@ -168,7 +168,7 @@ static int wm8400_dcdc_set_voltage(struct regulator_dev *dev, if (min_uV < 850000) return -EINVAL; - val = (min_uV - 825001) / 25000; + val = DIV_ROUND_UP(min_uV - 850000, 25000); if (850000 + (25000 * val) > max_uV) return -EINVAL; |