.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * spu aware cpufreq governor for the cell processor |
---|
3 | 4 | * |
---|
4 | 5 | * © Copyright IBM Corporation 2006-2008 |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Christian Krafft <krafft@de.ibm.com> |
---|
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 as published by |
---|
10 | | - * the Free Software Foundation; either version 2, or (at your option) |
---|
11 | | - * any later version. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program; if not, write to the Free Software |
---|
20 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
21 | 8 | */ |
---|
22 | 9 | |
---|
23 | 10 | #include <linux/cpufreq.h> |
---|
.. | .. |
---|
139 | 126 | .stop = spu_gov_stop, |
---|
140 | 127 | .owner = THIS_MODULE, |
---|
141 | 128 | }; |
---|
142 | | - |
---|
143 | | -/* |
---|
144 | | - * module init and destoy |
---|
145 | | - */ |
---|
146 | | - |
---|
147 | | -static int __init spu_gov_init(void) |
---|
148 | | -{ |
---|
149 | | - int ret; |
---|
150 | | - |
---|
151 | | - ret = cpufreq_register_governor(&spu_governor); |
---|
152 | | - if (ret) |
---|
153 | | - printk(KERN_ERR "registration of governor failed\n"); |
---|
154 | | - return ret; |
---|
155 | | -} |
---|
156 | | - |
---|
157 | | -static void __exit spu_gov_exit(void) |
---|
158 | | -{ |
---|
159 | | - cpufreq_unregister_governor(&spu_governor); |
---|
160 | | -} |
---|
161 | | - |
---|
162 | | - |
---|
163 | | -module_init(spu_gov_init); |
---|
164 | | -module_exit(spu_gov_exit); |
---|
| 129 | +cpufreq_governor_init(spu_governor); |
---|
| 130 | +cpufreq_governor_exit(spu_governor); |
---|
165 | 131 | |
---|
166 | 132 | MODULE_LICENSE("GPL"); |
---|
167 | 133 | MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>"); |
---|
168 | | - |
---|