diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-06-17 11:51:43 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2021-06-30 19:12:20 +0200 |
commit | 2f1a3bd4510afd8cf5ab5a6169ad64981a62dccf (patch) | |
tree | fcaa070eb6c531759dd722dabd47e09ec731fa67 /drivers/pwm | |
parent | 3b8b571fcc49e794703eb01a97e9ed8b85e88304 (diff) |
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-tegra.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c index e865743e5989..11a10b575ace 100644 --- a/drivers/pwm/pwm-tegra.c +++ b/drivers/pwm/pwm-tegra.c @@ -301,9 +301,11 @@ static int tegra_pwm_remove(struct platform_device *pdev) { struct tegra_pwm_chip *pc = platform_get_drvdata(pdev); + pwmchip_remove(&pc->chip); + reset_control_assert(pc->rst); - return pwmchip_remove(&pc->chip); + return 0; } #ifdef CONFIG_PM_SLEEP |