diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-20 14:47:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-20 14:47:18 -0500 |
commit | b3438f8266cb1f5010085ac47d7ad6a36a212164 (patch) | |
tree | bb74bd7a3ea7a629e380aa7761ba63a5e44992c7 /drivers | |
parent | f44ea623443ee0bec266d62f1cd346881224d47d (diff) |
Add "pure_initcall" for static variable initialization
This is a quick hack to overcome the fact that SRCU currently does not
allow static initializers, and we need to sometimes initialize those
things before any other initializers (even "core" ones) can do so.
Currently we don't allow this at all for modules, and the only user that
needs is right now is cpufreq. As reported by Thomas Gleixner:
"Commit b4dfdbb3c707474a2254c5b4d7e62be31a4b7da9 ("[PATCH] cpufreq:
make the transition_notifier chain use SRCU breaks cpu frequency
notification users, which register the callback > on core_init
level."
Cc: Thomas Gleixner <tglx@timesys.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 86e69b7f9122..dd0c2623e27b 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -59,7 +59,7 @@ static int __init init_cpufreq_transition_notifier_list(void) | |||
59 | srcu_init_notifier_head(&cpufreq_transition_notifier_list); | 59 | srcu_init_notifier_head(&cpufreq_transition_notifier_list); |
60 | return 0; | 60 | return 0; |
61 | } | 61 | } |
62 | core_initcall(init_cpufreq_transition_notifier_list); | 62 | pure_initcall(init_cpufreq_transition_notifier_list); |
63 | 63 | ||
64 | static LIST_HEAD(cpufreq_governor_list); | 64 | static LIST_HEAD(cpufreq_governor_list); |
65 | static DEFINE_MUTEX (cpufreq_governor_mutex); | 65 | static DEFINE_MUTEX (cpufreq_governor_mutex); |