diff options
Diffstat (limited to 'arch/frv/kernel/sysctl.c')
-rw-r--r-- | arch/frv/kernel/sysctl.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index 035516cb7a97..6c155d69da29 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
13 | #include <linux/sysctl.h> | 12 | #include <linux/sysctl.h> |
14 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -47,8 +46,9 @@ static void frv_change_dcache_mode(unsigned long newmode) | |||
47 | /* | 46 | /* |
48 | * handle requests to dynamically switch the write caching mode delivered by /proc | 47 | * handle requests to dynamically switch the write caching mode delivered by /proc |
49 | */ | 48 | */ |
50 | static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp, | 49 | static int procctl_frv_cachemode(ctl_table *table, int write, |
51 | void __user *buffer, size_t *lenp, loff_t *ppos) | 50 | void __user *buffer, size_t *lenp, |
51 | loff_t *ppos) | ||
52 | { | 52 | { |
53 | unsigned long hsr0; | 53 | unsigned long hsr0; |
54 | char buff[8]; | 54 | char buff[8]; |
@@ -85,7 +85,7 @@ static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp, | |||
85 | } | 85 | } |
86 | 86 | ||
87 | /* read the state */ | 87 | /* read the state */ |
88 | if (filp->f_pos > 0) { | 88 | if (*ppos > 0) { |
89 | *lenp = 0; | 89 | *lenp = 0; |
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
@@ -111,7 +111,7 @@ static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp, | |||
111 | return -EFAULT; | 111 | return -EFAULT; |
112 | 112 | ||
113 | *lenp = len; | 113 | *lenp = len; |
114 | filp->f_pos = len; | 114 | *ppos = len; |
115 | return 0; | 115 | return 0; |
116 | 116 | ||
117 | } /* end procctl_frv_cachemode() */ | 117 | } /* end procctl_frv_cachemode() */ |
@@ -121,8 +121,9 @@ static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp, | |||
121 | * permit the mm_struct the nominated process is using have its MMU context ID pinned | 121 | * permit the mm_struct the nominated process is using have its MMU context ID pinned |
122 | */ | 122 | */ |
123 | #ifdef CONFIG_MMU | 123 | #ifdef CONFIG_MMU |
124 | static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp, | 124 | static int procctl_frv_pin_cxnr(ctl_table *table, int write, |
125 | void __user *buffer, size_t *lenp, loff_t *ppos) | 125 | void __user *buffer, size_t *lenp, |
126 | loff_t *ppos) | ||
126 | { | 127 | { |
127 | pid_t pid; | 128 | pid_t pid; |
128 | char buff[16], *p; | 129 | char buff[16], *p; |
@@ -151,7 +152,7 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp, | |||
151 | } | 152 | } |
152 | 153 | ||
153 | /* read the currently pinned CXN */ | 154 | /* read the currently pinned CXN */ |
154 | if (filp->f_pos > 0) { | 155 | if (*ppos > 0) { |
155 | *lenp = 0; | 156 | *lenp = 0; |
156 | return 0; | 157 | return 0; |
157 | } | 158 | } |
@@ -164,7 +165,7 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp, | |||
164 | return -EFAULT; | 165 | return -EFAULT; |
165 | 166 | ||
166 | *lenp = len; | 167 | *lenp = len; |
167 | filp->f_pos = len; | 168 | *ppos = len; |
168 | return 0; | 169 | return 0; |
169 | 170 | ||
170 | } /* end procctl_frv_pin_cxnr() */ | 171 | } /* end procctl_frv_pin_cxnr() */ |