aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-08 04:56:11 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-18 09:05:29 -0400
commitc75b505ddaa08098940441226bb3a87c5b3179c0 (patch)
treed428db5b3aed36aa35342d132646622b9a8ab23d /include/linux
parent53155c0a5949d5cc3bd434d838e5b0c6e0542f9b (diff)
cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n
The drm/i915 driver wants to adjust it's own power policies using the cpu policies as a guideline (we can implicitly boost the cpus through the gpus on some platforms). To avoid a dreaded select (since a depends will leave users wondering where where their driver has gone too) add dummy functions. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: kbuild test robot <fengguang.wu@intel.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: cpufreq@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpufreq.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index fcabc42d66ab..5ad9a4e2bc59 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -93,8 +93,16 @@ struct cpufreq_policy {
93#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ 93#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
94#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ 94#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
95 95
96#ifdef CONFIG_CPU_FREQ
96struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); 97struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
97void cpufreq_cpu_put(struct cpufreq_policy *policy); 98void cpufreq_cpu_put(struct cpufreq_policy *policy);
99#else
100static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
101{
102 return NULL;
103}
104static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { }
105#endif
98 106
99static inline bool policy_is_shared(struct cpufreq_policy *policy) 107static inline bool policy_is_shared(struct cpufreq_policy *policy)
100{ 108{