diff options
author | Fabrice Gasnier <fabrice.gasnier@st.com> | 2018-07-20 03:16:32 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2018-08-20 05:32:25 -0400 |
commit | 2c2059c0b85d93d527cd23c0491288ef0264aee5 (patch) | |
tree | 4042a167ca5ca52d94c083f8675a3ed831a9292f /drivers/pwm/pwm-stm32-lp.c | |
parent | 43725feb593127b16318b871e3a9bf89a96d66cb (diff) |
pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove()
LPTimer has only one pwm channel (npwm = 1). Remove useless for loop
in remove routine.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-stm32-lp.c')
-rw-r--r-- | drivers/pwm/pwm-stm32-lp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 7c13e2505080..0059b24cfdc3 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c | |||
@@ -217,10 +217,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev) | |||
217 | static int stm32_pwm_lp_remove(struct platform_device *pdev) | 217 | static int stm32_pwm_lp_remove(struct platform_device *pdev) |
218 | { | 218 | { |
219 | struct stm32_pwm_lp *priv = platform_get_drvdata(pdev); | 219 | struct stm32_pwm_lp *priv = platform_get_drvdata(pdev); |
220 | unsigned int i; | ||
221 | 220 | ||
222 | for (i = 0; i < priv->chip.npwm; i++) | 221 | pwm_disable(&priv->chip.pwms[0]); |
223 | pwm_disable(&priv->chip.pwms[i]); | ||
224 | 222 | ||
225 | return pwmchip_remove(&priv->chip); | 223 | return pwmchip_remove(&priv->chip); |
226 | } | 224 | } |