Commit fcb1f22e authored by Dave Jones's avatar Dave Jones

[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
parent d347dfca
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment