From a67f7e6b601ab55067d02de42e89be34c4b6f345 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 19 Apr 2012 11:15:58 +0800 Subject: [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel commit 4ca1e1d "regulator: Convert 88pm8607 to set_voltage_sel" accidentally changed the value writing to vol_reg. What we want is to write val instead of selector to vol_reg. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/88pm8607.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index d04fbe953dd8..06d9c4baae75 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c @@ -232,7 +232,7 @@ static int pm8607_set_voltage_sel(struct regulator_dev *rdev, unsigned selector) val = (uint8_t)(selector << info->vol_shift); mask = (rdev->desc->n_voltages - 1) << info->vol_shift; - ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, selector); + ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, val); if (ret) return ret; switch (info->desc.id) { -- 2.39.5