]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
regulator: Fix setting selector in tps6524x set_voltage function
authorAxel Lin <axel.lin@gmail.com>
Thu, 8 Mar 2012 02:02:17 +0000 (10:02 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 11 Mar 2012 20:38:10 +0000 (20:38 +0000)
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
drivers/regulator/tps6524x-regulator.c

index 70b7b1f4f000e1f779ecdb2c2dbfaf3de4b11274..2e94686b6fe647cc8b424a36c813abdbd4e16629 100644 (file)
@@ -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);
 }