diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-02-06 11:10:51 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-02-08 11:23:43 +0000 |
commit | c6163a70237bba13e9cdcf6a71e6c28875e7a734 (patch) | |
tree | cf661bdd7d61a97bd2cd4159c016b70b69f1bc80 /drivers/regulator | |
parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff) | |
download | linux-3.10-c6163a70237bba13e9cdcf6a71e6c28875e7a734.tar.gz linux-3.10-c6163a70237bba13e9cdcf6a71e6c28875e7a734.tar.bz2 linux-3.10-c6163a70237bba13e9cdcf6a71e6c28875e7a734.zip |
regulator: max8998: Let regulator core handle the case selector == old_selector
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max8998.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 1f0df4046b8..24e2d1dec8c 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -311,25 +311,13 @@ static int max8998_set_voltage_buck_sel(struct regulator_dev *rdev, dev_get_platdata(max8998->iodev->dev); struct i2c_client *i2c = max8998->iodev->i2c; int buck = rdev_get_id(rdev); - int reg, shift = 0, mask, ret; - int j, previous_sel; + int reg, shift = 0, mask, ret, j; static u8 buck1_last_val; ret = max8998_get_voltage_register(rdev, ®, &shift, &mask); if (ret) return ret; - previous_sel = max8998_get_voltage_sel(rdev); - - /* Check if voltage needs to be changed */ - /* if previous_voltage equal new voltage, return */ - if (previous_sel == selector) { - dev_dbg(max8998->dev, "No voltage change, old:%d, new:%d\n", - regulator_list_voltage_linear(rdev, previous_sel), - regulator_list_voltage_linear(rdev, selector)); - return ret; - } - switch (buck) { case MAX8998_BUCK1: dev_dbg(max8998->dev, |