From: Axel Lin Date: Thu, 8 Mar 2012 02:02:17 +0000 (+0800) Subject: regulator: Fix setting selector in tps6524x set_voltage function X-Git-Tag: v3.3~16^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f03570cf1709397ebe656608266b44ec772960c2;p=profile%2Fcommon%2Fkernel-common.git regulator: Fix setting selector in tps6524x set_voltage function Don't assign the voltage to selector. Signed-off-by: Axel Lin Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 70b7b1f..2e94686 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/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); }