summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-03-13 19:18:39 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-03-20 15:31:28 -0400
commit448c8b1d07d5342922567e138a4b0108a42c24fb (patch)
treef995179c7a4afbe3eab6ed30e0d4d33eab5d967d /include
parent4bc25af79ec54b79266148f8c1b84bb1e7ff2621 (diff)
provide disable_cpufreq() function to disable the API.
useful for disabling cpufreq altogether. The cpu frequency scaling drivers and cpu frequency governors will fail to register. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpufreq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 6216115c778..8ff442753c7 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -35,6 +35,7 @@
#ifdef CONFIG_CPU_FREQ
int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
+extern void disable_cpufreq(void);
#else /* CONFIG_CPU_FREQ */
static inline int cpufreq_register_notifier(struct notifier_block *nb,
unsigned int list)
@@ -46,6 +47,7 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb,
{
return 0;
}
+static inline void disable_cpufreq(void) { }
#endif /* CONFIG_CPU_FREQ */
/* if (cpufreq_driver->target) exists, the ->governor decides what frequency