pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove()
authorFabrice Gasnier <fabrice.gasnier@st.com>
Fri, 20 Jul 2018 07:16:32 +0000 (09:16 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 20 Aug 2018 09:32:25 +0000 (11:32 +0200)
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>
drivers/pwm/pwm-stm32-lp.c

index 7c13e2505080e1495997b369800bcd05379ff018..0059b24cfdc3c39579b9e70b11b9f0271399db1a 100644 (file)
@@ -217,10 +217,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev)
 static int stm32_pwm_lp_remove(struct platform_device *pdev)
 {
        struct stm32_pwm_lp *priv = platform_get_drvdata(pdev);
-       unsigned int i;
 
-       for (i = 0; i < priv->chip.npwm; i++)
-               pwm_disable(&priv->chip.pwms[i]);
+       pwm_disable(&priv->chip.pwms[0]);
 
        return pwmchip_remove(&priv->chip);
 }