@@ -56,6 +56,7 @@ struct cpufreq_dom {
};
static LIST_HEAD_READ_MOSTLY(cpufreq_dom_list_head);
+bool __initdata cpufreq_governor_internal;
struct cpufreq_governor *__read_mostly cpufreq_opt_governor;
LIST_HEAD_READ_MOSTLY(cpufreq_governor_list);
@@ -121,6 +122,13 @@ int __init cpufreq_register_governor(struct cpufreq_governor *governor)
if (!governor)
return -EINVAL;
+ if (cpufreq_governor_internal &&
+ strstr(governor->name, "-internal") == NULL)
+ return -EINVAL;
+
+ if (!cpufreq_governor_internal && strstr(governor->name, "-internal"))
+ return -EINVAL;
+
if (__find_governor(governor->name) != NULL)
return -EEXIST;
@@ -114,6 +114,8 @@ extern struct cpufreq_governor cpufreq_gov_userspace;
extern struct cpufreq_governor cpufreq_gov_performance;
extern struct cpufreq_governor cpufreq_gov_powersave;
+extern bool cpufreq_governor_internal;
+
extern struct list_head cpufreq_governor_list;
extern int cpufreq_register_governor(struct cpufreq_governor *governor);