linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable
@ 2017-11-07  3:30 Axel Lin
  2017-11-07  8:26 ` Fabrice Gasnier
  2017-12-05  8:35 ` Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2017-11-07  3:30 UTC (permalink / raw)
  To: linux-pwm; +Cc: Thierry Reding, Fabrice Gasnier, Lee Jones, Axel Lin

The same checking is done by the implementation of pwm_disable().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pwm/pwm-stm32-lp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index 9793b296108f..1ac9e4384142 100644
--- a/drivers/pwm/pwm-stm32-lp.c
+++ b/drivers/pwm/pwm-stm32-lp.c
@@ -219,8 +219,7 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)
 	unsigned int i;
 
 	for (i = 0; i < priv->chip.npwm; i++)
-		if (pwm_is_enabled(&priv->chip.pwms[i]))
-			pwm_disable(&priv->chip.pwms[i]);
+		pwm_disable(&priv->chip.pwms[i]);
 
 	return pwmchip_remove(&priv->chip);
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable
  2017-11-07  3:30 [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable Axel Lin
@ 2017-11-07  8:26 ` Fabrice Gasnier
  2017-12-05  8:35 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Gasnier @ 2017-11-07  8:26 UTC (permalink / raw)
  To: Axel Lin, linux-pwm; +Cc: Thierry Reding, Lee Jones

On 11/07/2017 04:30 AM, Axel Lin wrote:
> The same checking is done by the implementation of pwm_disable().
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pwm/pwm-stm32-lp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
> index 9793b296108f..1ac9e4384142 100644
> --- a/drivers/pwm/pwm-stm32-lp.c
> +++ b/drivers/pwm/pwm-stm32-lp.c
> @@ -219,8 +219,7 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)
>  	unsigned int i;
>  
>  	for (i = 0; i < priv->chip.npwm; i++)
> -		if (pwm_is_enabled(&priv->chip.pwms[i]))
> -			pwm_disable(&priv->chip.pwms[i]);
> +		pwm_disable(&priv->chip.pwms[i]);
>  
>  	return pwmchip_remove(&priv->chip);
>  }
> 

Hi Axel,

Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>

Thanks,
Fabrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable
  2017-11-07  3:30 [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable Axel Lin
  2017-11-07  8:26 ` Fabrice Gasnier
@ 2017-12-05  8:35 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2017-12-05  8:35 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-pwm, Fabrice Gasnier, Lee Jones

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

On Tue, Nov 07, 2017 at 11:30:41AM +0800, Axel Lin wrote:
> The same checking is done by the implementation of pwm_disable().
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pwm/pwm-stm32-lp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

I don't think I ever mentioned that I had applied this for v4.15-rc1, so
just letting you know in case you were wondering.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-05  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07  3:30 [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable Axel Lin
2017-11-07  8:26 ` Fabrice Gasnier
2017-12-05  8:35 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).