From: Axel Lin Date: Thu, 19 Apr 2012 03:15:58 +0000 (+0800) Subject: regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a67f7e6b601ab55067d02de42e89be34c4b6f345;p=linux-beck.git 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 --- 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) {