hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/cpufreq/cpufreq_performance.c
....@@ -1,13 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/drivers/cpufreq/cpufreq_performance.c
34 *
45 * Copyright (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
5
- *
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
10
- *
116 */
127
138 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -25,18 +20,9 @@
2520 static struct cpufreq_governor cpufreq_gov_performance = {
2621 .name = "performance",
2722 .owner = THIS_MODULE,
23
+ .flags = CPUFREQ_GOV_STRICT_TARGET,
2824 .limits = cpufreq_gov_performance_limits,
2925 };
30
-
31
-static int __init cpufreq_gov_performance_init(void)
32
-{
33
- return cpufreq_register_governor(&cpufreq_gov_performance);
34
-}
35
-
36
-static void __exit cpufreq_gov_performance_exit(void)
37
-{
38
- cpufreq_unregister_governor(&cpufreq_gov_performance);
39
-}
4026
4127 #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
4228 struct cpufreq_governor *cpufreq_default_governor(void)
....@@ -55,5 +41,5 @@
5541 MODULE_DESCRIPTION("CPUfreq policy governor 'performance'");
5642 MODULE_LICENSE("GPL");
5743
58
-fs_initcall(cpufreq_gov_performance_init);
59
-module_exit(cpufreq_gov_performance_exit);
44
+cpufreq_governor_init(cpufreq_gov_performance);
45
+cpufreq_governor_exit(cpufreq_gov_performance);