summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-10-14 07:32:00 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:38:04 (GMT)
commit1f5acf90b02785901ad11ca0eed4d251d48d339b (patch)
tree6e9dc8070fc571b915fbaea730c1319e93e9d8c6 /drivers/pwm
parent95eb68d11a583748ff4b8d695f4bee5d1e00fc24 (diff)
downloadlinux-fsl-qoriq-1f5acf90b02785901ad11ca0eed4d251d48d339b.tar.xz
pwm: ftm: fix one bug of wrong counting the use counter.
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> --- upstream link: http://patchwork.ozlabs.org/patch/399746/ it is under discussion. Change-Id: I6f139f1b3fd5dd8f3a4fda729c348aaab9bf66bd Reviewed-on: http://git.am.freescale.net:8181/21348 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Dongsheng Wang <dongsheng.wang@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-fsl-ftm.c4
1 files changed, 1 insertions, 3 deletions
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;
}