hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/cpufreq/cpufreq_conservative.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/cpufreq/cpufreq_conservative.c
34 *
....@@ -5,10 +6,6 @@
56 * (C) 2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>.
67 * Jun Nakajima <jun.nakajima@intel.com>
78 * (C) 2009 Alexander Clouter <alex@digriz.org.uk>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
129 */
1310
1411 #include <linux/slab.h>
....@@ -325,17 +322,7 @@
325322 .start = cs_start,
326323 };
327324
328
-#define CPU_FREQ_GOV_CONSERVATIVE (&cs_governor.gov)
329
-
330
-static int __init cpufreq_gov_dbs_init(void)
331
-{
332
- return cpufreq_register_governor(CPU_FREQ_GOV_CONSERVATIVE);
333
-}
334
-
335
-static void __exit cpufreq_gov_dbs_exit(void)
336
-{
337
- cpufreq_unregister_governor(CPU_FREQ_GOV_CONSERVATIVE);
338
-}
325
+#define CPU_FREQ_GOV_CONSERVATIVE (cs_governor.gov)
339326
340327 MODULE_AUTHOR("Alexander Clouter <alex@digriz.org.uk>");
341328 MODULE_DESCRIPTION("'cpufreq_conservative' - A dynamic cpufreq governor for "
....@@ -346,11 +333,9 @@
346333 #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
347334 struct cpufreq_governor *cpufreq_default_governor(void)
348335 {
349
- return CPU_FREQ_GOV_CONSERVATIVE;
336
+ return &CPU_FREQ_GOV_CONSERVATIVE;
350337 }
351
-
352
-fs_initcall(cpufreq_gov_dbs_init);
353
-#else
354
-module_init(cpufreq_gov_dbs_init);
355338 #endif
356
-module_exit(cpufreq_gov_dbs_exit);
339
+
340
+cpufreq_governor_init(CPU_FREQ_GOV_CONSERVATIVE);
341
+cpufreq_governor_exit(CPU_FREQ_GOV_CONSERVATIVE);