.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * drivers/cpufreq/cpufreq_conservative.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * (C) 2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>. |
---|
6 | 7 | * Jun Nakajima <jun.nakajima@intel.com> |
---|
7 | 8 | * (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. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/slab.h> |
---|
.. | .. |
---|
325 | 322 | .start = cs_start, |
---|
326 | 323 | }; |
---|
327 | 324 | |
---|
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) |
---|
339 | 326 | |
---|
340 | 327 | MODULE_AUTHOR("Alexander Clouter <alex@digriz.org.uk>"); |
---|
341 | 328 | MODULE_DESCRIPTION("'cpufreq_conservative' - A dynamic cpufreq governor for " |
---|
.. | .. |
---|
346 | 333 | #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE |
---|
347 | 334 | struct cpufreq_governor *cpufreq_default_governor(void) |
---|
348 | 335 | { |
---|
349 | | - return CPU_FREQ_GOV_CONSERVATIVE; |
---|
| 336 | + return &CPU_FREQ_GOV_CONSERVATIVE; |
---|
350 | 337 | } |
---|
351 | | - |
---|
352 | | -fs_initcall(cpufreq_gov_dbs_init); |
---|
353 | | -#else |
---|
354 | | -module_init(cpufreq_gov_dbs_init); |
---|
355 | 338 | #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); |
---|