aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2006-07-06 15:32:01 -0400
committerDave Jones <davej@redhat.com>2006-07-31 18:37:06 -0400
commitea71497020c55cd39221e0abad5c1752ac6e3f47 (patch)
treecd0fb594af99f384f11b0834d6302b956bfd6f15 /drivers/cpufreq/cpufreq.c
parent3bcb09a35641f2840bd59d8f82154f830dca282c (diff)
[CPUFREQ] [2/2] demand load governor modules.
Demand-load cpufreq governor modules if needed. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 9b416372a8e4..b3df613ae4ec 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -321,6 +321,23 @@ static int cpufreq_parse_governor (char *str_governor, unsigned int *policy,
321 321
322 t = __find_governor(str_governor); 322 t = __find_governor(str_governor);
323 323
324 if (t == NULL) {
325 char *name = kasprintf(GFP_KERNEL, "cpufreq_%s", str_governor);
326
327 if (name) {
328 int ret;
329
330 mutex_unlock(&cpufreq_governor_mutex);
331 ret = request_module(name);
332 mutex_lock(&cpufreq_governor_mutex);
333
334 if (ret == 0)
335 t = __find_governor(str_governor);
336 }
337
338 kfree(name);
339 }
340
324 if (t != NULL) { 341 if (t != NULL) {
325 *governor = t; 342 *governor = t;
326 err = 0; 343 err = 0;