提交 2f1a3bd4 编写于 作者: U Uwe Kleine-König 提交者: Thierry Reding

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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 3b8b571f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册