mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 06:08:22 +00:00
pwm: atmel: Free resources only after pwmchip_remove()
Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clock. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
1a7a6e8072
commit
89c6f31460
1 changed files with 3 additions and 1 deletions
|
@ -450,10 +450,12 @@ static int atmel_pwm_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct atmel_pwm_chip *atmel_pwm = platform_get_drvdata(pdev);
|
||||
|
||||
pwmchip_remove(&atmel_pwm->chip);
|
||||
|
||||
clk_unprepare(atmel_pwm->clk);
|
||||
mutex_destroy(&atmel_pwm->isr_lock);
|
||||
|
||||
return pwmchip_remove(&atmel_pwm->chip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver atmel_pwm_driver = {
|
||||
|
|
Loading…
Add table
Reference in a new issue