regulator: tps6586x-regulator - fix bit_mask parameter for tps6586x_set_bits()
authorAxel Lin <axel.lin@gmail.com>
Sun, 22 Aug 2010 14:42:42 +0000 (22:42 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 1 Sep 2010 11:59:34 +0000 (12:59 +0100)
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>
drivers/regulator/tps6586x-regulator.c

index facd439d0f1281fb463125d1900f6114ee0d11b7..51237fbb1bbb7e15f952296a9ffcb9f668418fc9 100644 (file)
@@ -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)