All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: STM32 fix compilation warning
@ 2017-01-25  8:50 Benjamin Gaignard
  0 siblings, 0 replies; only message in thread
From: Benjamin Gaignard @ 2017-01-25  8:50 UTC (permalink / raw)
  To: sfr, linux-next, linux-kernel, thierry.reding, lee.jones
  Cc: Benjamin Gaignard

remove useless curstate variable.

Fixes: bafffb6e7bd1 ("pwm: Add driver for STM32 plaftorm")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 drivers/pwm/pwm-stm32.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index ce6232e..6139512 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -189,7 +189,6 @@ static void stm32_pwm_disable(struct stm32_pwm *priv, int ch)
 static int stm32_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
 			   struct pwm_state *state)
 {
-	struct pwm_state curstate;
 	bool enabled;
 	struct stm32_pwm *priv = to_stm32_pwm_dev(chip);
 	int ret;
@@ -201,7 +200,7 @@ static int stm32_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
 		return 0;
 	}
 
-	if (state->polarity != curstate.polarity)
+	if (state->polarity != pwm->state.polarity)
 		stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
 
 	ret = stm32_pwm_config(priv, pwm->hwpwm,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-25  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25  8:50 [PATCH] pwm: STM32 fix compilation warning Benjamin Gaignard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.