diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-10-15 09:21:33 +0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2014-12-01 12:43:45 +0300 |
commit | 8e6e76510287d1a08c7c36e8e076b1314f59d9c4 (patch) | |
tree | 35ba37dfcc413a40e94332f6adc7558f5c098d13 /drivers/pwm/pwm-fsl-ftm.c | |
parent | 06e4cb6b1d5c9dba007b1f7a039384b2fc1a8827 (diff) | |
download | linux-8e6e76510287d1a08c7c36e8e076b1314f59d9c4.tar.xz |
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: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-fsl-ftm.c')
-rw-r--r-- | drivers/pwm/pwm-fsl-ftm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c index 0f2cc7ef7784..1150598b7532 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; } |