projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9ea2e7
)
pwm: sti: Free resources only after pwmchip_remove()
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Tue, 30 Mar 2021 12:37:42 +0000
(14:37 +0200)
committer
Thierry Reding
<thierry.reding@gmail.com>
Fri, 9 Apr 2021 12:46:58 +0000
(14:46 +0200)
Before pwmchip_remove() returns the PWM is expected to be functional. So
remove the pwmchip before disabling the clocks.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sti.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-sti.c
b/drivers/pwm/pwm-sti.c
index
3064b32
..
f491d56
100644
(file)
--- a/
drivers/pwm/pwm-sti.c
+++ b/
drivers/pwm/pwm-sti.c
@@
-650,11
+650,12
@@
static int sti_pwm_remove(struct platform_device *pdev)
{
struct sti_pwm_chip *pc = platform_get_drvdata(pdev);
+ pwmchip_remove(&pc->chip);
clk_unprepare(pc->pwm_clk);
clk_unprepare(pc->cpt_clk);
- return
pwmchip_remove(&pc->chip)
;
+ return
0
;
}
static const struct of_device_id sti_pwm_of_match[] = {