linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove()
@ 2018-07-20  7:16 Fabrice Gasnier
  2018-08-20  9:31 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Gasnier @ 2018-07-20  7:16 UTC (permalink / raw)
  To: thierry.reding
  Cc: fabrice.gasnier, alexandre.torgue, mcoquelin.stm32, linux-pwm,
	linux-arm-kernel, linux-kernel

LPTimer has only one pwm channel (npwm = 1). Remove useless for loop
in remove routine.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 drivers/pwm/pwm-stm32-lp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index 7c13e25..0059b24c 100644
--- a/drivers/pwm/pwm-stm32-lp.c
+++ b/drivers/pwm/pwm-stm32-lp.c
@@ -217,10 +217,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev)
 static int stm32_pwm_lp_remove(struct platform_device *pdev)
 {
 	struct stm32_pwm_lp *priv = platform_get_drvdata(pdev);
-	unsigned int i;
 
-	for (i = 0; i < priv->chip.npwm; i++)
-		pwm_disable(&priv->chip.pwms[i]);
+	pwm_disable(&priv->chip.pwms[0]);
 
 	return pwmchip_remove(&priv->chip);
 }
-- 
1.9.1


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

* Re: [PATCH] pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove()
  2018-07-20  7:16 [PATCH] pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove() Fabrice Gasnier
@ 2018-08-20  9:31 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2018-08-20  9:31 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: alexandre.torgue, mcoquelin.stm32, linux-pwm, linux-arm-kernel,
	linux-kernel

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

On Fri, Jul 20, 2018 at 09:16:32AM +0200, Fabrice Gasnier wrote:
> LPTimer has only one pwm channel (npwm = 1). Remove useless for loop
> in remove routine.
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>  drivers/pwm/pwm-stm32-lp.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks.

Thierry

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

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

end of thread, other threads:[~2018-08-20  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20  7:16 [PATCH] pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove() Fabrice Gasnier
2018-08-20  9:31 ` 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).