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

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).