summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2015-06-05 19:42:47 +0100
committerMark Brown <broonie@kernel.org>2015-06-08 19:18:19 +0100
commitab101e35448b777a62a5e02155783ec93d4c77db (patch)
tree39d11175e00db0b05bd508e3f6b764daf67a2f29 /drivers/regulator
parentc779cebb7def3fd17aae5276f9a71f3c5237bc3f (diff)
downloadop-kernel-dev-ab101e35448b777a62a5e02155783ec93d4c77db.zip
op-kernel-dev-ab101e35448b777a62a5e02155783ec93d4c77db.tar.gz
regulator: pwm-regulator: Diffientiate between dev (device) and rdev (regulator_dev)
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pwm-regulator.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index c2b86eb..ffa9612 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -31,17 +31,17 @@ struct pwm_voltages {
unsigned int dutycycle;
};
-static int pwm_regulator_get_voltage_sel(struct regulator_dev *dev)
+static int pwm_regulator_get_voltage_sel(struct regulator_dev *rdev)
{
- struct pwm_regulator_data *drvdata = rdev_get_drvdata(dev);
+ struct pwm_regulator_data *drvdata = rdev_get_drvdata(rdev);
return drvdata->state;
}
-static int pwm_regulator_set_voltage_sel(struct regulator_dev *dev,
+static int pwm_regulator_set_voltage_sel(struct regulator_dev *rdev,
unsigned selector)
{
- struct pwm_regulator_data *drvdata = rdev_get_drvdata(dev);
+ struct pwm_regulator_data *drvdata = rdev_get_drvdata(rdev);
unsigned int pwm_reg_period;
int dutycycle;
int ret;
@@ -53,7 +53,7 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *dev,
ret = pwm_config(drvdata->pwm, dutycycle, pwm_reg_period);
if (ret) {
- dev_err(&dev->dev, "Failed to configure PWM\n");
+ dev_err(&rdev->dev, "Failed to configure PWM\n");
return ret;
}
@@ -61,19 +61,19 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *dev,
ret = pwm_enable(drvdata->pwm);
if (ret) {
- dev_err(&dev->dev, "Failed to enable PWM\n");
+ dev_err(&rdev->dev, "Failed to enable PWM\n");
return ret;
}
return 0;
}
-static int pwm_regulator_list_voltage(struct regulator_dev *dev,
+static int pwm_regulator_list_voltage(struct regulator_dev *rdev,
unsigned selector)
{
- struct pwm_regulator_data *drvdata = rdev_get_drvdata(dev);
+ struct pwm_regulator_data *drvdata = rdev_get_drvdata(rdev);
- if (selector >= dev->desc->n_voltages)
+ if (selector >= rdev->desc->n_voltages)
return -EINVAL;
return drvdata->duty_cycle_table[selector].uV;
OpenPOWER on IntegriCloud