diff options
author | Lee Jones <lee.jones@linaro.org> | 2015-06-05 19:42:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-08 19:18:19 +0100 |
commit | c779cebb7def3fd17aae5276f9a71f3c5237bc3f (patch) | |
tree | 2a5b576fb5a4a931fe349a702ef8af49b1bdd6e4 /drivers/regulator/pwm-regulator.c | |
parent | b6f55e74d2babc0f6495c1e3fb12761388baa56f (diff) |
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/pwm-regulator.c')
-rw-r--r-- | drivers/regulator/pwm-regulator.c | 12 |
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; |