[lkml]   [2013]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] 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 <>
Cc: kbuild test robot <>
Cc: "Rafael J. Wysocki" <>
Cc: Viresh Kumar <>
Signed-off-by: Daniel Vetter <>
A quick ack for merging this this through the drm-intel tree is
probably the simplest way forward.
include/linux/cpufreq.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index fcabc42..5ad9a4e 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -93,8 +93,16 @@ struct cpufreq_policy {
#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/

struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
void cpufreq_cpu_put(struct cpufreq_policy *policy);
+static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
+ return NULL;
+static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { }

static inline bool policy_is_shared(struct cpufreq_policy *policy)

 \ /
  Last update: 2013-10-08 11:41    [W:0.050 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site