mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
pwm: bcm2835: 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: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
d4ac3917bc
commit
3c817469a5
1 changed files with 3 additions and 1 deletions
|
@ -179,9 +179,11 @@ static int bcm2835_pwm_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct bcm2835_pwm *pc = platform_get_drvdata(pdev);
|
struct bcm2835_pwm *pc = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
pwmchip_remove(&pc->chip);
|
||||||
|
|
||||||
clk_disable_unprepare(pc->clk);
|
clk_disable_unprepare(pc->clk);
|
||||||
|
|
||||||
return pwmchip_remove(&pc->chip);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id bcm2835_pwm_of_match[] = {
|
static const struct of_device_id bcm2835_pwm_of_match[] = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue