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

pwm: vt8500: Only unprepare the clock after the pwmchip was removed

Until pwmchip_remove() returns the PWM is supposed to work, so
pwmchip_remove() must be called before the clock is stopped.

The return value of pwmchip_remove doesn't need to be checked because
it returns zero anyhow and I plan to make it return void soon.
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 fb2cb3bf
...@@ -240,10 +240,11 @@ static int vt8500_pwm_remove(struct platform_device *pdev) ...@@ -240,10 +240,11 @@ static int vt8500_pwm_remove(struct platform_device *pdev)
{ {
struct vt8500_chip *chip = platform_get_drvdata(pdev); struct vt8500_chip *chip = platform_get_drvdata(pdev);
pwmchip_remove(&chip->chip);
clk_unprepare(chip->clk); clk_unprepare(chip->clk);
return pwmchip_remove(&chip->chip); return 0;
} }
static struct platform_driver vt8500_pwm_driver = { static struct platform_driver vt8500_pwm_driver = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册