git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
cpufreq
/
proc_intf.c
diff --git
a/drivers/cpufreq/proc_intf.c
b/drivers/cpufreq/proc_intf.c
index
81d58c7
..
6739778
100644
(file)
--- a/
drivers/cpufreq/proc_intf.c
+++ b/
drivers/cpufreq/proc_intf.c
@@
-12,9
+12,12
@@
#include <linux/proc_fs.h>
#include <asm/uaccess.h>
#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))
#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.
/**
* cpufreq_parse_policy - parse a policy string
* @input_string: the string to parse.
@@
-110,6
+113,13
@@
static int cpufreq_proc_read (
if (off != 0)
goto end;
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\n");
+ }
+
p += sprintf(p, " minimum CPU frequency - maximum CPU frequency - policy\n");
for (i=0;i<NR_CPUS;i++) {
if (!cpu_online(i))
p += sprintf(p, " minimum CPU frequency - maximum CPU frequency - policy\n");
for (i=0;i<NR_CPUS;i++) {
if (!cpu_online(i))
@@
-164,7
+174,7
@@
end:
*/
static int cpufreq_proc_write (
struct file *file,
*/
static int cpufreq_proc_write (
struct file *file,
- const char *buffer,
+ const char
__user
*buffer,
unsigned long count,
void *data)
{
unsigned long count,
void *data)
{
@@
-179,6
+189,13
@@
static int cpufreq_proc_write (
if (copy_from_user(proc_string, buffer, count))
return -EFAULT;
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\n");
+ }
proc_string[count] = '\0';
proc_string[count] = '\0';