Jelajahi Sumber

regulator: Fix setting selector in tps6524x set_voltage function

Don't assign the voltage to selector.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Axel Lin 13 tahun lalu
induk
melakukan
f03570cf17
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      drivers/regulator/tps6524x-regulator.c

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

@@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV,
 	if (i >= info->n_voltages)
 		i = info->n_voltages - 1;
 
-	*selector = info->voltages[i];
+	*selector = i;
 
 	return write_field(hw, &info->voltage, i);
 }