VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / cpufreq / cpufreq_userspace.c
index 5102144..161e8a2 100644 (file)
@@ -151,13 +151,13 @@ EXPORT_SYMBOL_GPL(cpufreq_setmax);
 /*********************** cpufreq_sysctl interface ********************/
 static int
 cpufreq_procctl(ctl_table *ctl, int write, struct file *filp,
-               void __user *buffer, size_t *lenp)
+               void __user *buffer, size_t *lenp, loff_t *ppos)
 {
        char buf[16], *p;
        int cpu = (long) ctl->extra1;
        unsigned int len, left = *lenp;
 
-       if (!left || (filp->f_pos && !write) || !cpu_online(cpu)) {
+       if (!left || (*ppos && !write) || !cpu_online(cpu)) {
                *lenp = 0;
                return 0;
        }
@@ -183,7 +183,7 @@ cpufreq_procctl(ctl_table *ctl, int write, struct file *filp,
        }
 
        *lenp = len;
-       filp->f_pos += len;
+       *ppos += len;
        return 0;
 }