regulator: wm831x: Set the new rather than old value for DVS VSEL
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 20 Nov 2012 01:02:06 +0000 (10:02 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 20 Nov 2012 01:42:13 +0000 (10:42 +0900)
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
drivers/regulator/wm831x-dcdc.c

index 782c228a19bd503ccda868ac67f46cce7fbba2e7..416fe0a37f56351ff06a0e971b55748a33654332 100644 (file)
@@ -290,7 +290,7 @@ static int wm831x_buckv_set_voltage_sel(struct regulator_dev *rdev,
        if (vsel > dcdc->dvs_vsel) {
                ret = wm831x_set_bits(wm831x, dvs_reg,
                                      WM831X_DC1_DVS_VSEL_MASK,
-                                     dcdc->dvs_vsel);
+                                     vsel);
                if (ret == 0)
                        dcdc->dvs_vsel = vsel;
                else