diff options
Diffstat (limited to 'kernel/cpufreq.c')
| -rw-r--r-- | kernel/cpufreq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/cpufreq.c b/kernel/cpufreq.c index 8446f4d97a85..d6e15f1a27f1 100644 --- a/kernel/cpufreq.c +++ b/kernel/cpufreq.c @@ -29,12 +29,9 @@ * level driver of CPUFreq support, and its locking mutex. * cpu_max_freq is in kHz. */ -struct cpufreq_driver *cpufreq_driver; +static struct cpufreq_driver *cpufreq_driver; static DECLARE_MUTEX (cpufreq_driver_sem); -/* required for the proc interface, remove when that goes away */ -EXPORT_SYMBOL_GPL(cpufreq_driver); - /** * Two notifier lists: the "policy" list is involved in the * validation process for a new CPU frequency policy; the @@ -58,6 +55,9 @@ static int cpufreq_cpu_get(unsigned int cpu) { if (cpu >= NR_CPUS) return 0; + if (!cpufreq_driver) + return 0; + if (!try_module_get(cpufreq_driver->owner)) return 0; |
