Skip to contentSkip to conversation

regulator: Fix setting selector in tps6524x set_voltage function

PATCH Applied Axel Lin 2 participants 2 messages Mar 8, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: Fix setting selector in tps6524x set_voltage function

Don't assign the voltage to selector.

---
 drivers/regulator/tps6524x-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/tps6524x-regulator.c +1 -1
index 70b7b1f..2e94686 100644
@@ -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);
 }
Signature · 1 line
1.7.5.4
Applied
#1 lore raw
Quoted 1 line · Axel Lin

Don't assign the voltage to selector.

Applied, thanks.