Skip to content

Commit 2f1a3bd

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: tegra: Assert reset only after the PWM was unregistered
The driver is supposed to stay functional until pwmchip_remove() returns. So the reset must be asserted only after that. pwmchip_remove() always returns 0, so the return code can be ignored which keeps the tegra_pwm_remove() a bit simpler. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 3b8b571 commit 2f1a3bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/pwm/pwm-tegra.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,11 @@ static int tegra_pwm_remove(struct platform_device *pdev)
301301
{
302302
struct tegra_pwm_chip *pc = platform_get_drvdata(pdev);
303303

304+
pwmchip_remove(&pc->chip);
305+
304306
reset_control_assert(pc->rst);
305307

306-
return pwmchip_remove(&pc->chip);
308+
return 0;
307309
}
308310

309311
#ifdef CONFIG_PM_SLEEP

0 commit comments

Comments
 (0)