diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 21:37:37 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 21:37:37 +0000 |
commit | 63236f4038f7e14762114606d95769c32cf6cac1 (patch) | |
tree | 326303a0880c46ddadfc29d3bacad073ed1cef20 /drivers/regulator/ab8500.c | |
parent | 16fbcc3b1139e90fe560fde5619169db74dc02c2 (diff) | |
parent | ca61a7bfcd1c68eba84a58070540684448216506 (diff) | |
download | linux-63236f4038f7e14762114606d95769c32cf6cac1.tar.bz2 |
Merge remote-tracking branch 'regulator/topic/drivers' into regulator-next
Diffstat (limited to 'drivers/regulator/ab8500.c')
-rw-r--r-- | drivers/regulator/ab8500.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index c9b92531ae60..c7ee4c15d6f5 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -201,7 +201,7 @@ static int ab8500_list_voltage(struct regulator_dev *rdev, unsigned selector) return info->voltages[selector]; } -static int ab8500_regulator_get_voltage(struct regulator_dev *rdev) +static int ab8500_regulator_get_voltage_sel(struct regulator_dev *rdev) { int ret, val; struct ab8500_regulator_info *info = rdev_get_drvdata(rdev); @@ -229,11 +229,9 @@ static int ab8500_regulator_get_voltage(struct regulator_dev *rdev) /* vintcore has a different layout */ val = regval & info->voltage_mask; if (info->desc.id == AB8500_LDO_INTCORE) - ret = info->voltages[val >> 0x3]; + return val >> 0x3; else - ret = info->voltages[val]; - - return ret; + return val; } static int ab8500_get_best_voltage_index(struct regulator_dev *rdev, @@ -320,7 +318,7 @@ static struct regulator_ops ab8500_regulator_ops = { .enable = ab8500_regulator_enable, .disable = ab8500_regulator_disable, .is_enabled = ab8500_regulator_is_enabled, - .get_voltage = ab8500_regulator_get_voltage, + .get_voltage_sel = ab8500_regulator_get_voltage_sel, .set_voltage = ab8500_regulator_set_voltage, .list_voltage = ab8500_list_voltage, .enable_time = ab8500_regulator_enable_time, |