提交 ea714970 编写于 作者: J Jeremy Fitzhardinge 提交者: Dave Jones

[CPUFREQ] [2/2] demand load governor modules.

Demand-load cpufreq governor modules if needed.
Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: NDave Jones <davej@redhat.com>
上级 3bcb09a3
......@@ -321,6 +321,23 @@ static int cpufreq_parse_governor (char *str_governor, unsigned int *policy,
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;
err = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册