pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable
Subsystems (3)
PATCH 1/1 pwm: stm32-lp: Remove pwm_is_enabled check before calling pwm_disable
The same checking is done by the implementation of pwm_disable().
Signed-off-by Axel Lin <[email protected]>
--- drivers/pwm/pwm-stm32-lp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pwm/pwm-stm32-lp.c +1 -2
@@ -219,8 +219,7 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)unsigned int i;for (i =0 ; i < priv->chip.npwm; i++) -if (pwm_is_enabled (&priv->chip.pwms[i])) -pwm_disable (&priv->chip.pwms[i]); +pwm_disable (&priv->chip.pwms[i]);return pwmchip_remove (&priv->chip); }
Signature · 1 line
2.11.0
Quoted 13 lines · Axel Lin
The same checking is done by the implementation of
pwm_disable().Signed-off-by Axel Lin <[email protected]>--- drivers/pwm/pwm-stm32-lp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/pwm/pwm-stm32-lp.c +0
-0
drivers/pwm/pwm-stm32-lp.c static int stm32_pwm_lp_remove(struct platform_device *pdev) · line 225
Quoted 9 lines
drivers/pwm/pwm-stm32-lp.c +1
-2@@ -219,8 +219,7 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)unsigned int i;for (i =0 ; i < priv->chip.npwm; i++) -if (pwm_is_enabled (&priv->chip.pwms[i])) -pwm_disable (&priv->chip.pwms[i]); +pwm_disable (&priv->chip.pwms[i]);return pwmchip_remove (&priv->chip); }
Hi Axel,
Acked-by Fabrice Gasnier <[email protected]>
Thanks,
Fabrice
Quoted 6 lines · Axel Lin
The same checking is done by the implementation of
pwm_disable().Signed-off-by Axel Lin <[email protected]>--- drivers/pwm/pwm-stm32-lp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
I don't think I ever mentioned that I had applied this for v4.15-rc1, so just letting you know in case you were wondering.
Thierry