From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: linus.walleij@linaro.org, geert+renesas@glider.be,
thierry.reding@gmail.com, robh+dt@kernel.org,
mark.rutland@arm.com
Cc: linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: [PATCH RFC 5/7] pwm: rcar: remove a redundant condition in rcar_pwm_apply()
Date: Mon, 8 Jul 2019 18:07:46 +0900 [thread overview]
Message-ID: <1562576868-8124-6-git-send-email-yoshihiro.shimoda.uh@renesas.com> (raw)
In-Reply-To: <1562576868-8124-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>
Since the rcar_pwm_apply() has already check whehter state->enabled
is not set or not, this patch removes a redundant condition.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/pwm/pwm-rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c
index 5b2b8ec..c8cd43f 100644
--- a/drivers/pwm/pwm-rcar.c
+++ b/drivers/pwm/pwm-rcar.c
@@ -187,7 +187,7 @@ static int rcar_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
/* The SYNC should be set to 0 even if rcar_pwm_set_counter failed */
rcar_pwm_update(rp, RCAR_PWMCR_SYNC, 0, RCAR_PWMCR);
- if (!ret && state->enabled)
+ if (!ret)
ret = rcar_pwm_enable(rp);
return ret;
--
2.7.4
next prev parent reply other threads:[~2019-07-08 9:07 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 9:07 [PATCH RFC 0/7] treewide: modify sh-pfc and add support pwm duty zero Yoshihiro Shimoda
2019-07-08 9:07 ` [PATCH RFC 1/7] pinctrl: sh-pfc: add new flags into struct sh_pfc_pin_config Yoshihiro Shimoda
2019-07-08 15:51 ` Sergei Shtylyov
2019-08-06 8:46 ` Geert Uytterhoeven
2019-07-08 9:07 ` [PATCH RFC 2/7] pinctrl: sh-pfc: remove incomplete flag "cfg->type" Yoshihiro Shimoda
2019-07-28 23:02 ` Linus Walleij
2019-07-29 5:16 ` Yoshihiro Shimoda
2019-08-06 8:49 ` Geert Uytterhoeven
2019-08-06 9:23 ` Geert Uytterhoeven
2019-08-06 11:48 ` Yoshihiro Shimoda
2019-07-08 9:07 ` [PATCH RFC 3/7] pinctrl: sh-pfc: Rollback to mux if requires when the gpio is freed Yoshihiro Shimoda
2019-08-06 9:02 ` Geert Uytterhoeven
2019-08-06 11:38 ` Yoshihiro Shimoda
2019-08-06 12:01 ` Geert Uytterhoeven
2019-07-08 9:07 ` [PATCH RFC 4/7] dt-bindings: pwm: rcar: Add specific gpios property to output duty zero Yoshihiro Shimoda
2019-08-06 9:21 ` Geert Uytterhoeven
2019-07-08 9:07 ` Yoshihiro Shimoda [this message]
2019-08-06 9:05 ` [PATCH RFC 5/7] pwm: rcar: remove a redundant condition in rcar_pwm_apply() Geert Uytterhoeven
2019-08-06 11:39 ` Yoshihiro Shimoda
2019-08-06 16:00 ` Uwe Kleine-König
2019-08-07 2:56 ` Yoshihiro Shimoda
2019-08-07 6:33 ` Uwe Kleine-König
2019-07-08 9:07 ` [PATCH RFC 6/7] pwm: rcar: Add gpio support to output duty zero Yoshihiro Shimoda
2019-08-07 7:03 ` Uwe Kleine-König
2019-08-08 3:52 ` Yoshihiro Shimoda
2019-08-08 6:49 ` Geert Uytterhoeven
2019-08-08 7:02 ` Yoshihiro Shimoda
2019-08-08 7:31 ` Uwe Kleine-König
2019-07-08 9:07 ` [PATCH RFC 7/7] arm64: dts: renesas: salvator-common: add gpio property into pwm1 Yoshihiro Shimoda
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=1562576868-8124-6-git-send-email-yoshihiro.shimoda.uh@renesas.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@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).