diff options
| author | Dave Jones <davej@codemonkey.org.uk> | 2003-06-05 19:10:13 +0100 |
|---|---|---|
| committer | Dave Jones <davej@codemonkey.org.uk> | 2003-06-05 19:10:13 +0100 |
| commit | fcb1f22e3d5c8d4a217c5904d30d3cf384b10ccf (patch) | |
| tree | 1adeab23e0987128ee6b73d918cef9de7188285b | |
| parent | d347dfcad44c2c5011241676e2109c6150259b47 (diff) | |
[CPUFREQ] kill cpufreq_driver export.
From Dominik Brodowski.
This removes the special export of cpufreq_driver for proc_intf.c. Instead,
the behaviour of /proc/cpufreq previous of Greg's class re-write is back:
the check whether cpufreq_driver is loaded is done within cpufreq_cpu_get
| -rw-r--r-- | drivers/cpufreq/proc_intf.c | 5 | ||||
| -rw-r--r-- | kernel/cpufreq.c | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/drivers/cpufreq/proc_intf.c b/drivers/cpufreq/proc_intf.c index 253dab930b06..dc89b83710b8 100644 --- a/drivers/cpufreq/proc_intf.c +++ b/drivers/cpufreq/proc_intf.c @@ -209,10 +209,7 @@ static int __init cpufreq_proc_init (void) { struct proc_dir_entry *entry = NULL; - if (!cpufreq_driver) - return -ENODEV; - - /* are these acceptable values? */ + /* are these acceptable values? */ entry = create_proc_entry("cpufreq", S_IFREG|S_IRUGO|S_IWUSR, &proc_root); 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; |
