* [PATCH] pwm: atmel: Free resources only after pwmchip_remove()
@ 2021-03-24 19:56 Uwe Kleine-König
2021-04-02 10:55 ` Claudiu.Beznea
2021-04-09 12:28 ` Thierry Reding
0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2021-03-24 19:56 UTC (permalink / raw)
To: Thierry Reding, Lee Jones
Cc: Claudiu Beznea, Nicolas Ferre, Alexandre Belloni,
Ludovic Desroches, linux-pwm, kernel
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>
---
drivers/pwm/pwm-atmel.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index a4d0be6b265b..d49da708337f 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -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 = {
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm: atmel: Free resources only after pwmchip_remove()
2021-03-24 19:56 [PATCH] pwm: atmel: Free resources only after pwmchip_remove() Uwe Kleine-König
@ 2021-04-02 10:55 ` Claudiu.Beznea
2021-04-02 20:27 ` Uwe Kleine-König
2021-04-09 12:28 ` Thierry Reding
1 sibling, 1 reply; 5+ messages in thread
From: Claudiu.Beznea @ 2021-04-02 10:55 UTC (permalink / raw)
To: u.kleine-koenig, thierry.reding, lee.jones
Cc: Nicolas.Ferre, alexandre.belloni, Ludovic.Desroches, linux-pwm, kernel
Hi Uwe,
On 24.03.2021 21:56, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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>> ---
Does this need a fixes tag?
Other than this:
Ack-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Thank you,
Claudiu
> drivers/pwm/pwm-atmel.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
> index a4d0be6b265b..d49da708337f 100644
> --- a/drivers/pwm/pwm-atmel.c
> +++ b/drivers/pwm/pwm-atmel.c
> @@ -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 = {
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm: atmel: Free resources only after pwmchip_remove()
2021-04-02 10:55 ` Claudiu.Beznea
@ 2021-04-02 20:27 ` Uwe Kleine-König
2021-04-05 7:46 ` Claudiu.Beznea
0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2021-04-02 20:27 UTC (permalink / raw)
To: Claudiu.Beznea
Cc: thierry.reding, lee.jones, linux-pwm, alexandre.belloni,
Ludovic.Desroches, Nicolas.Ferre, kernel
[-- Attachment #1: Type: text/plain, Size: 997 bytes --]
On Fri, Apr 02, 2021 at 10:55:14AM +0000, Claudiu.Beznea@microchip.com wrote:
> Hi Uwe,
>
> On 24.03.2021 21:56, Uwe Kleine-König wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > 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>> ---
>
> Does this need a fixes tag?
Hmm, that would be:
Fixes: 32b16d46e415 ("pwm: atmel-pwm: Add Atmel PWM controller driver")
which is the commit that introduced the driver in 2013.
> Other than this:
> Ack-by: Claudiu Beznea <claudiu.beznea@microchip.com>
You might want to make this "Acked-by:" so that patchwork automatically
picks this up.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm: atmel: Free resources only after pwmchip_remove()
2021-04-02 20:27 ` Uwe Kleine-König
@ 2021-04-05 7:46 ` Claudiu.Beznea
0 siblings, 0 replies; 5+ messages in thread
From: Claudiu.Beznea @ 2021-04-05 7:46 UTC (permalink / raw)
To: u.kleine-koenig
Cc: thierry.reding, lee.jones, linux-pwm, alexandre.belloni,
Ludovic.Desroches, Nicolas.Ferre, kernel
On 02.04.2021 23:27, Uwe Kleine-König wrote:
>> Other than this:
>> Ack-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> You might want to make this "Acked-by:" so that patchwork automatically
> picks this up.
Yep, typo...
Acked-by: Claudiu Beznea <claudiu.beznea@microchip.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm: atmel: Free resources only after pwmchip_remove()
2021-03-24 19:56 [PATCH] pwm: atmel: Free resources only after pwmchip_remove() Uwe Kleine-König
2021-04-02 10:55 ` Claudiu.Beznea
@ 2021-04-09 12:28 ` Thierry Reding
1 sibling, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2021-04-09 12:28 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Lee Jones, Claudiu Beznea, Nicolas Ferre, Alexandre Belloni,
Ludovic Desroches, linux-pwm, kernel
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On Wed, Mar 24, 2021 at 08:56:35PM +0100, Uwe Kleine-König wrote:
> 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>
> ---
> drivers/pwm/pwm-atmel.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-09 12:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 19:56 [PATCH] pwm: atmel: Free resources only after pwmchip_remove() Uwe Kleine-König
2021-04-02 10:55 ` Claudiu.Beznea
2021-04-02 20:27 ` Uwe Kleine-König
2021-04-05 7:46 ` Claudiu.Beznea
2021-04-09 12:28 ` Thierry Reding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.