Message ID | 1565246333-2185-1-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | [v2] pwm: rcar: remove a redundant condition in rcar_pwm_apply() | expand |
Hello! On 08.08.2019 9:38, Yoshihiro Shimoda wrote: > Since the rcar_pwm_apply() has already check whehter state->enabled Checked? > is not set or not, this patch removes a redundant condition. Is set or not? > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [...] MBR, Sergei
On Thu, Aug 08, 2019 at 12:55:40PM +0300, Sergei Shtylyov wrote: > Hello! > > On 08.08.2019 9:38, Yoshihiro Shimoda wrote: > > > Since the rcar_pwm_apply() has already check whehter state->enabled > > Checked? and "whether" Best regards Uwe
Hello! Thank you for your review! And, I'm sorry for the delayed response because I had a vacation. > From: Uwe Kleine-Konig, Sent: Friday, August 9, 2019 6:11 PM > > On Thu, Aug 08, 2019 at 12:55:40PM +0300, Sergei Shtylyov wrote: > > Hello! > > > > On 08.08.2019 9:38, Yoshihiro Shimoda wrote: > > > > > Since the rcar_pwm_apply() has already check whehter state->enabled > > > > Checked? > > and "whether" I'll revise it. Best regards, Yoshihiro Shimoda > Best regards > Uwe > > > -- > Pengutronix e.K. | Uwe Kleine-König | > Industrial Linux Solutions | http://www.pengutronix.de/ |
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;