hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/cpufreq/cpufreq_userspace.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12
23 /*
34 * linux/drivers/cpufreq/cpufreq_userspace.c
45 *
56 * Copyright (C) 2001 Russell King
67 * (C) 2002 - 2004 Dominik Brodowski <linux@brodo.de>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
11
- *
128 */
139
1410 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -128,16 +124,6 @@
128124 .owner = THIS_MODULE,
129125 };
130126
131
-static int __init cpufreq_gov_userspace_init(void)
132
-{
133
- return cpufreq_register_governor(&cpufreq_gov_userspace);
134
-}
135
-
136
-static void __exit cpufreq_gov_userspace_exit(void)
137
-{
138
- cpufreq_unregister_governor(&cpufreq_gov_userspace);
139
-}
140
-
141127 MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>, "
142128 "Russell King <rmk@arm.linux.org.uk>");
143129 MODULE_DESCRIPTION("CPUfreq policy governor 'userspace'");
....@@ -148,9 +134,7 @@
148134 {
149135 return &cpufreq_gov_userspace;
150136 }
151
-
152
-fs_initcall(cpufreq_gov_userspace_init);
153
-#else
154
-module_init(cpufreq_gov_userspace_init);
155137 #endif
156
-module_exit(cpufreq_gov_userspace_exit);
138
+
139
+cpufreq_governor_init(cpufreq_gov_userspace);
140
+cpufreq_governor_exit(cpufreq_gov_userspace);