Skip to content

Commit d44084c

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: stm32-lp: Don't modify HW state in .remove() callback
A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent 9d768cd commit d44084c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/pwm/pwm-stm32-lp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)
222222
{
223223
struct stm32_pwm_lp *priv = platform_get_drvdata(pdev);
224224

225-
pwm_disable(&priv->chip.pwms[0]);
226-
227225
return pwmchip_remove(&priv->chip);
228226
}
229227

0 commit comments

Comments
 (0)