From: Jeremy Fitzhardinge <jeremy@goop.org>
To: cpufreq@lists.linux.org.uk,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] cpufreq: demand load governor modules
Date: Thu, 06 Jul 2006 12:32:01 -0700 [thread overview]
Message-ID: <44AD6531.7050803@goop.org> (raw)
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;
reply other threads:[~2006-07-06 19:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44AD6531.7050803@goop.org \
--to=jeremy@goop.org \
--cc=cpufreq@lists.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox