mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
cpufreq: governor: userspace: Fix frequency error when suspend and resume
As policy->cur may be changed by thermal and cpufreq_suspend, the setspeed may be changed after resume. Change-Id: I6d4e0672ff39127c522f305719afd52806c31f48 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
parent
fd31310414
commit
982038bc24
|
|
@ -91,7 +91,8 @@ static int cpufreq_governor_userspace(struct cpufreq_policy *policy,
|
|||
|
||||
mutex_lock(&userspace_mutex);
|
||||
per_cpu(cpu_is_managed, cpu) = 1;
|
||||
*setspeed = policy->cur;
|
||||
if (!*setspeed)
|
||||
*setspeed = policy->cur;
|
||||
mutex_unlock(&userspace_mutex);
|
||||
break;
|
||||
case CPUFREQ_GOV_STOP:
|
||||
|
|
@ -99,7 +100,6 @@ static int cpufreq_governor_userspace(struct cpufreq_policy *policy,
|
|||
|
||||
mutex_lock(&userspace_mutex);
|
||||
per_cpu(cpu_is_managed, cpu) = 0;
|
||||
*setspeed = 0;
|
||||
mutex_unlock(&userspace_mutex);
|
||||
break;
|
||||
case CPUFREQ_GOV_LIMITS:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user