summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-08-22 16:42:42 +0200
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-09-01 13:59:34 +0200
commit938b45927c240cf75a01ce29af3f173762e762f8 (patch)
treeebac1011400f450b26932e2960beed9852ea8049 /drivers/regulator
parentregulator: tps6586x-regulator - fix value range checking for val (diff)
downloadlinux-938b45927c240cf75a01ce29af3f173762e762f8.tar.xz
linux-938b45927c240cf75a01ce29af3f173762e762f8.zip
regulator: tps6586x-regulator - fix bit_mask parameter for tps6586x_set_bits()
The third parameter of tps6586x_set_bits() is the bit_mask, thus we should use (1 << ri->go_bit) instead of ri->go_bit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps6586x-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index facd439d0f12..51237fbb1bbb 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -150,7 +150,7 @@ static int tps6586x_dvm_set_voltage(struct regulator_dev *rdev,
if (ret)
return ret;
- return tps6586x_set_bits(parent, ri->go_reg, ri->go_bit);
+ return tps6586x_set_bits(parent, ri->go_reg, 1 << ri->go_bit);
}
static int tps6586x_regulator_enable(struct regulator_dev *rdev)