diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-03-13 19:18:39 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2012-03-14 14:45:03 -0400 |
commit | a7b422cda5084db7265c3b23310a959b43b47529 (patch) | |
tree | 32cb3e1dbde6b23814cc4e9c432db92754e89679 /include/linux | |
parent | 562a6cbe1cf2edf0a87a659eb26095400322430e (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/linux')
-rw-r--r-- | include/linux/cpufreq.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 6216115c7789..8ff442753c75 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #ifdef CONFIG_CPU_FREQ | 35 | #ifdef CONFIG_CPU_FREQ |
36 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 36 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
37 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | 37 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); |
38 | extern void disable_cpufreq(void); | ||
38 | #else /* CONFIG_CPU_FREQ */ | 39 | #else /* CONFIG_CPU_FREQ */ |
39 | static inline int cpufreq_register_notifier(struct notifier_block *nb, | 40 | static inline int cpufreq_register_notifier(struct notifier_block *nb, |
40 | unsigned int list) | 41 | unsigned int list) |
@@ -46,6 +47,7 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb, | |||
46 | { | 47 | { |
47 | return 0; | 48 | return 0; |
48 | } | 49 | } |
50 | static inline void disable_cpufreq(void) { } | ||
49 | #endif /* CONFIG_CPU_FREQ */ | 51 | #endif /* CONFIG_CPU_FREQ */ |
50 | 52 | ||
51 | /* if (cpufreq_driver->target) exists, the ->governor decides what frequency | 53 | /* if (cpufreq_driver->target) exists, the ->governor decides what frequency |