From bfd24887f63b7683c402f89c31a9d4f5b588d723 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 26 Nov 2012 18:10:12 +0000 Subject: [PATCH] --- yaml --- r: 336722 b: refs/heads/master c: 3e33ee9e0804748f1b7a01af9ba0e8e1e10f772f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/cpufreq/cpufreq_ondemand.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c88edaaa70a8..aa30583452ad 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 420993221175a45db5af012c53fd2fef4d9533dc +refs/heads/master: 3e33ee9e0804748f1b7a01af9ba0e8e1e10f772f diff --git a/trunk/drivers/cpufreq/cpufreq_ondemand.c b/trunk/drivers/cpufreq/cpufreq_ondemand.c index cca3e9fee9a7..7731f7c7e79a 100644 --- a/trunk/drivers/cpufreq/cpufreq_ondemand.c +++ b/trunk/drivers/cpufreq/cpufreq_ondemand.c @@ -40,6 +40,10 @@ static struct dbs_data od_dbs_data; static DEFINE_PER_CPU(struct od_cpu_dbs_info_s, od_cpu_dbs_info); +#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND +static struct cpufreq_governor cpufreq_gov_ondemand; +#endif + static struct od_dbs_tuners od_tuners = { .up_threshold = DEF_FREQUENCY_UP_THRESHOLD, .sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR, @@ -279,6 +283,10 @@ static void update_sampling_rate(unsigned int new_rate) policy = cpufreq_cpu_get(cpu); if (!policy) continue; + if (policy->governor != &cpufreq_gov_ondemand) { + cpufreq_cpu_put(policy); + continue; + } dbs_info = &per_cpu(od_cpu_dbs_info, policy->cpu); cpufreq_cpu_put(policy);