Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e6e7651 authored by Xiubo Li's avatar Xiubo Li Committed by Thierry Reding
Browse files

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: default avatarXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 06e4cb6b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;
}