Messages in this thread Patch in this message | | | Date | Thu, 06 Jul 2006 12:32:01 -0700 | From | Jeremy Fitzhardinge <> | Subject | [PATCH 2/2] cpufreq: demand load governor modules |
| |
Demand-load cpufreq governor modules if needed.
Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
--- drivers/cpufreq/cpufreq.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff -r 4650553b3f11 drivers/cpufreq/cpufreq.c --- a/drivers/cpufreq/cpufreq.c Wed Jul 05 15:21:25 2006 -0700 +++ b/drivers/cpufreq/cpufreq.c Wed Jul 05 15:25:52 2006 -0700 @@ -320,6 +320,23 @@ static int cpufreq_parse_governor (char mutex_lock(&cpufreq_governor_mutex); t = __find_governor(str_governor); + + if (t == NULL) { + char *name = kasprintf(GFP_KERNEL, "cpufreq_%s", str_governor); + + if (name) { + int ret; + + mutex_unlock(&cpufreq_governor_mutex); + ret = request_module(name); + mutex_lock(&cpufreq_governor_mutex); + + if (ret == 0) + t = __find_governor(str_governor); + } + + kfree(name); + } if (t != NULL) { *governor = t;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |