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-Url: https://git.stricted.de/?a=commitdiff_plain;h=938b45927c240cf75a01ce29af3f173762e762f8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 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)