diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2019-08-24 11:37:06 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2019-09-20 19:48:55 -0400 |
commit | c9675829ba4b0e95c613f6d6d83d2b5cb9c5371c (patch) | |
tree | 6a69a1c7745ffde73aa36befcbac90b94322fa44 /drivers/pwm/pwm-fsl-ftm.c | |
parent | deb9c462f4e539cc7f8389b9855eb7a507c78e7e (diff) |
pwm: fsl-ftm: Don't update the state for the caller of pwm_apply_state()
The pwm-fsl-ftm driver is one of only three PWM drivers which updates
the state for the caller of pwm_apply_state(). This might have
surprising results if the caller reuses the values expecting them to
still represent the same state.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-fsl-ftm.c')
-rw-r--r-- | drivers/pwm/pwm-fsl-ftm.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c index 9d31a217111d..3c9738617ceb 100644 --- a/drivers/pwm/pwm-fsl-ftm.c +++ b/drivers/pwm/pwm-fsl-ftm.c | |||
@@ -292,10 +292,6 @@ static int fsl_pwm_apply_config(struct fsl_pwm_chip *fpc, | |||
292 | 292 | ||
293 | regmap_update_bits(fpc->regmap, FTM_POL, BIT(pwm->hwpwm), reg_polarity); | 293 | regmap_update_bits(fpc->regmap, FTM_POL, BIT(pwm->hwpwm), reg_polarity); |
294 | 294 | ||
295 | newstate->period = fsl_pwm_ticks_to_ns(fpc, | ||
296 | fpc->period.mod_period + 1); | ||
297 | newstate->duty_cycle = fsl_pwm_ticks_to_ns(fpc, duty); | ||
298 | |||
299 | ftm_set_write_protection(fpc); | 295 | ftm_set_write_protection(fpc); |
300 | 296 | ||
301 | return 0; | 297 | return 0; |