From: Axel Lin Date: Sun, 22 Aug 2010 14:42:42 +0000 (+0800) Subject: regulator: tps6586x-regulator - fix bit_mask parameter for tps6586x_set_bits() X-Git-Tag: v2.6.36-rc5~29^2~8 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=938b45927c240cf75a01ce29af3f173762e762f8;p=~shefty%2Frdma-dev.git 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 Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index facd439d0f1..51237fbb1bb 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)