diff options
author | 2020-03-06 12:49:56 +0100 | |
---|---|---|
committer | 2020-03-06 12:49:56 +0100 | |
commit | 1b10d388d094bb32129060236add6f50b204a69d (patch) | |
tree | 08272a4d89833d139e615b07675f95e403cdddbd /drivers/cpufreq | |
parent | sched/numa: Stop an exhastive search if a reasonable swap candidate or idle C... (diff) | |
parent | Merge tag '5.6-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 (diff) | |
download | linux-1b10d388d094bb32129060236add6f50b204a69d.tar.gz linux-1b10d388d094bb32129060236add6f50b204a69d.tar.bz2 linux-1b10d388d094bb32129060236add6f50b204a69d.zip |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index cbe6c94bf158..808874bccf4a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1076,9 +1076,17 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy) pol = policy->last_policy; } else if (def_gov) { pol = cpufreq_parse_policy(def_gov->name); - } else { - return -ENODATA; + /* + * In case the default governor is neiter "performance" + * nor "powersave", fall back to the initial policy + * value set by the driver. + */ + if (pol == CPUFREQ_POLICY_UNKNOWN) + pol = policy->policy; } + if (pol != CPUFREQ_POLICY_PERFORMANCE && + pol != CPUFREQ_POLICY_POWERSAVE) + return -ENODATA; } return cpufreq_set_policy(policy, gov, pol); |