提交 8e6e7651 编写于 作者: X Xiubo Li 提交者: Thierry Reding

pwm: ftm: Correctly track usage count

No matter how many times the FTM PWM is enabled, the use_count will
always be one.
Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 06e4cb6b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册