@@ -185,7 +185,7 @@ config CPU_FREQ_GOV_CONSERVATIVE
If in doubt, say N.
config CPU_FREQ_GOV_SCHEDUTIL
- bool "'schedutil' cpufreq policy governor"
+ tristate "'schedutil' cpufreq policy governor"
depends on CPU_FREQ && SMP
select CPU_FREQ_GOV_ATTR_SET
select IRQ_WORK
@@ -786,15 +786,20 @@ struct cpufreq_governor schedutil_gov = {
#endif /* CONFIG_ENERGY_MODEL */
};
+static int __init sugov_register(void)
+{
+ return cpufreq_register_governor(&schedutil_gov);
+}
+
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
struct cpufreq_governor *cpufreq_default_governor(void)
{
return &schedutil_gov;
}
+core_initcall(sugov_register);
+#else
+module_init(sugov_register);
#endif
-static int __init sugov_register(void)
-{
- return cpufreq_register_governor(&schedutil_gov);
-}
-core_initcall(sugov_register);
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Schedutil CPUFreq Governor");
Now that all requirements to modularize schedutil are met, make the Kconfig option tristate and add the missing MODULE_*() declarations in cpufreq_schedutil.c. Signed-off-by: Quentin Perret <qperret@google.com> --- drivers/cpufreq/Kconfig | 2 +- kernel/sched/cpufreq_schedutil.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-)