From: Axel Lin <axel.lin@ingics.com>
To: linux-pwm@vger.kernel.org
Cc: Thierry Reding <thierry.reding@gmail.com>,
Fabrice Gasnier <fabrice.gasnier@st.com>,
Lee Jones <lee.jones@linaro.org>, Axel Lin <axel.lin@ingics.com>
Subject: [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable
Date: Tue, 7 Nov 2017 11:30:41 +0800 [thread overview]
Message-ID: <20171107033041.10905-1-axel.lin@ingics.com> (raw)
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
next reply other threads:[~2017-11-07 3:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 3:30 Axel Lin [this message]
2017-11-07 8:26 ` [PATCH] pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable Fabrice Gasnier
2017-12-05 8:35 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171107033041.10905-1-axel.lin@ingics.com \
--to=axel.lin@ingics.com \
--cc=fabrice.gasnier@st.com \
--cc=lee.jones@linaro.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).