Commit 71629218 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] deprecate proc_intf, and inform of removal ~2005-01-01

The /proc/cpufreq interface was deprecated already when cpufreq was merged
into the kernel. With 2.7. not appearing soon, let's do the same what's
suggested for devfs and others: inform users of it being deprecated.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent e6c34387
......@@ -12,9 +12,12 @@
#include <linux/proc_fs.h>
#include <asm/uaccess.h>
#warning This module will be removed from the 2.6. kernel series soon after 2005-01-01
#define CPUFREQ_ALL_CPUS ((NR_CPUS))
static unsigned int warning_print = 0;
/**
* cpufreq_parse_policy - parse a policy string
* @input_string: the string to parse.
......@@ -110,6 +113,11 @@ static int cpufreq_proc_read (
if (off != 0)
goto end;
if (!warning_print) {
warning_print++;
printk(KERN_INFO "Access to /proc/cpufreq is deprecated and will be removed from (new) 2.6. kernels soon after 2005-01-01");
}
p += sprintf(p, " minimum CPU frequency - maximum CPU frequency - policy\n");
for (i=0;i<NR_CPUS;i++) {
if (!cpu_online(i))
......@@ -180,6 +188,11 @@ static int cpufreq_proc_write (
if (copy_from_user(proc_string, buffer, count))
return -EFAULT;
if (!warning_print) {
warning_print++;
printk(KERN_INFO "Access to /proc/cpufreq is deprecated and will be removed from (new) 2.6. kernels soon after 2005-01-01");
}
proc_string[count] = '\0';
result = cpufreq_parse_policy(proc_string, &policy);
......
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