Commit c779cebb authored by Lee Jones's avatar Lee Jones Committed by Mark Brown

regulator: pwm-regulator: Remove superfluous is_enabled check

The core framework already takes care of this.
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b6f55e74
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
struct pwm_regulator_data { struct pwm_regulator_data {
struct pwm_voltages *duty_cycle_table; struct pwm_voltages *duty_cycle_table;
struct pwm_device *pwm; struct pwm_device *pwm;
bool enabled;
int state; int state;
}; };
...@@ -60,14 +59,11 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *dev, ...@@ -60,14 +59,11 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *dev,
drvdata->state = selector; drvdata->state = selector;
if (!drvdata->enabled) {
ret = pwm_enable(drvdata->pwm); ret = pwm_enable(drvdata->pwm);
if (ret) { if (ret) {
dev_err(&dev->dev, "Failed to enable PWM\n"); dev_err(&dev->dev, "Failed to enable PWM\n");
return ret; return ret;
} }
drvdata->enabled = true;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment