mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
pwm: bcm-iproc: 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> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
89c6f31460
commit
d4ac3917bc
1 changed files with 3 additions and 1 deletions
|
@ -253,9 +253,11 @@ static int iproc_pwmc_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct iproc_pwmc *ip = platform_get_drvdata(pdev);
|
||||
|
||||
pwmchip_remove(&ip->chip);
|
||||
|
||||
clk_disable_unprepare(ip->clk);
|
||||
|
||||
return pwmchip_remove(&ip->chip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id bcm_iproc_pwmc_dt[] = {
|
||||
|
|
Loading…
Reference in a new issue