summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-28 11:01:48 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-01 14:59:40 +0400
commit509cbf848c9b1cb18a424beed732829bc04e7b06 (patch)
tree481cb995f0d3289fed6223f2cf4692ef1ce182dc
parent4ca1e1d9e15b99529e55860677fe39b791b88920 (diff)
downloadlinux-509cbf848c9b1cb18a424beed732829bc04e7b06.tar.xz
regulator: Convert 88pm8607 to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Jett Zhou <jtzhou@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/88pm8607.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 7fafff23ec43..11e5ddd7e796 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -246,7 +246,7 @@ static int pm8607_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
return ret;
}
-static int pm8607_get_voltage(struct regulator_dev *rdev)
+static int pm8607_get_voltage_sel(struct regulator_dev *rdev)
{
struct pm8607_regulator_info *info = rdev_get_drvdata(rdev);
uint8_t val, mask;
@@ -259,7 +259,7 @@ static int pm8607_get_voltage(struct regulator_dev *rdev)
mask = (rdev->desc->n_voltages - 1) << info->vol_shift;
val = ((unsigned char)ret & mask) >> info->vol_shift;
- return pm8607_list_voltage(rdev, val);
+ return val;
}
static int pm8607_enable(struct regulator_dev *rdev)
@@ -294,7 +294,7 @@ static int pm8607_is_enabled(struct regulator_dev *rdev)
static struct regulator_ops pm8607_regulator_ops = {
.list_voltage = pm8607_list_voltage,
.set_voltage_sel = pm8607_set_voltage_sel,
- .get_voltage = pm8607_get_voltage,
+ .get_voltage_sel = pm8607_get_voltage_sel,
.enable = pm8607_enable,
.disable = pm8607_disable,
.is_enabled = pm8607_is_enabled,