summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2015-06-05 19:42:46 +0100
committerMark Brown <broonie@kernel.org>2015-06-08 19:18:19 +0100
commitc779cebb7def3fd17aae5276f9a71f3c5237bc3f (patch)
tree2a5b576fb5a4a931fe349a702ef8af49b1bdd6e4 /drivers/regulator
parentb6f55e74d2babc0f6495c1e3fb12761388baa56f (diff)
downloadlinux-c779cebb7def3fd17aae5276f9a71f3c5237bc3f.tar.bz2
regulator: pwm-regulator: Remove superfluous is_enabled check
The core framework already takes care of this. 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.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index a79b5bcfec1d..c2b86eb97dd2 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -23,7 +23,6 @@
struct pwm_regulator_data {
struct pwm_voltages *duty_cycle_table;
struct pwm_device *pwm;
- bool enabled;
int state;
};
@@ -60,13 +59,10 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *dev,
drvdata->state = selector;
- if (!drvdata->enabled) {
- ret = pwm_enable(drvdata->pwm);
- if (ret) {
- dev_err(&dev->dev, "Failed to enable PWM\n");
- return ret;
- }
- drvdata->enabled = true;
+ ret = pwm_enable(drvdata->pwm);
+ if (ret) {
+ dev_err(&dev->dev, "Failed to enable PWM\n");
+ return ret;
}
return 0;