Explorar o código

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>
Axel Lin %!s(int64=15) %!d(string=hai) anos
pai
achega
938b45927c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/regulator/tps6586x-regulator.c

+ 1 - 1
drivers/regulator/tps6586x-regulator.c

@@ -150,7 +150,7 @@ static int tps6586x_dvm_set_voltage(struct regulator_dev *rdev,
 	if (ret)
 	if (ret)
 		return 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)
 static int tps6586x_regulator_enable(struct regulator_dev *rdev)