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>
This commit is contained in:
committed by
Dave Jones
parent
562a6cbe1c
commit
a7b422cda5
@@ -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
|
||||
|
Reference in New Issue
Block a user