Message ID | 1413350495-40980-2-git-send-email-Li.Xiubo@freescale.com |
---|---|
State | Accepted |
Headers | show |
diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c index 0f2cc7e..1150598 100644 --- a/drivers/pwm/pwm-fsl-ftm.c +++ b/drivers/pwm/pwm-fsl-ftm.c @@ -299,7 +299,7 @@ static int fsl_counter_clock_enable(struct fsl_pwm_chip *fpc) { int ret; - if (fpc->use_count != 0) + if (fpc->use_count++ != 0) return 0; /* select counter clock source */ @@ -316,8 +316,6 @@ static int fsl_counter_clock_enable(struct fsl_pwm_chip *fpc) return ret; } - fpc->use_count++; - return 0; }
No matter what times the FTM pwm is enabled, the use_count will always be one. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> --- drivers/pwm/pwm-fsl-ftm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)