Skip to content

Commit e9c2f69

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: stm32: 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 86eed2a commit e9c2f69

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/pwm/pwm-stm32.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,6 @@ static int stm32_pwm_probe(struct platform_device *pdev)
649649
static void stm32_pwm_remove(struct platform_device *pdev)
650650
{
651651
struct stm32_pwm *priv = platform_get_drvdata(pdev);
652-
unsigned int i;
653-
654-
for (i = 0; i < priv->chip.npwm; i++)
655-
pwm_disable(&priv->chip.pwms[i]);
656652

657653
pwmchip_remove(&priv->chip);
658654
}

0 commit comments

Comments
 (0)