aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2008-02-08 07:18:27 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:23 -0500
commit76df0c25d0c34eba9fbb8a44106ed096553ba0e8 (patch)
treea68241a860699f952a1cfcf22e50ddbc19bba7c9
parent4237e0d3de38da640d7c977d68f5f7f1d207a631 (diff)
proc: simplify function prototypes
Move code around so as to reduce the number of forward-declarations. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/proc/generic.c18
-rw-r--r--fs/proc/proc_tty.c3
2 files changed, 6 insertions, 15 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 75cd8d709f7f..1c91eed26451 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -25,12 +25,6 @@
25 25
26#include "internal.h" 26#include "internal.h"
27 27
28static ssize_t proc_file_read(struct file *file, char __user *buf,
29 size_t nbytes, loff_t *ppos);
30static ssize_t proc_file_write(struct file *file, const char __user *buffer,
31 size_t count, loff_t *ppos);
32static loff_t proc_file_lseek(struct file *, loff_t, int);
33
34DEFINE_SPINLOCK(proc_subdir_lock); 28DEFINE_SPINLOCK(proc_subdir_lock);
35 29
36static int proc_match(int len, const char *name, struct proc_dir_entry *de) 30static int proc_match(int len, const char *name, struct proc_dir_entry *de)
@@ -40,12 +34,6 @@ static int proc_match(int len, const char *name, struct proc_dir_entry *de)
40 return !memcmp(name, de->name, len); 34 return !memcmp(name, de->name, len);
41} 35}
42 36
43static const struct file_operations proc_file_operations = {
44 .llseek = proc_file_lseek,
45 .read = proc_file_read,
46 .write = proc_file_write,
47};
48
49/* buffer size is one page but our output routines use some slack for overruns */ 37/* buffer size is one page but our output routines use some slack for overruns */
50#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024) 38#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024)
51 39
@@ -233,6 +221,12 @@ proc_file_lseek(struct file *file, loff_t offset, int orig)
233 return retval; 221 return retval;
234} 222}
235 223
224static const struct file_operations proc_file_operations = {
225 .llseek = proc_file_lseek,
226 .read = proc_file_read,
227 .write = proc_file_write,
228};
229
236static int proc_notify_change(struct dentry *dentry, struct iattr *iattr) 230static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
237{ 231{
238 struct inode *inode = dentry->d_inode; 232 struct inode *inode = dentry->d_inode;
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 22846225acfa..34296839b417 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -15,9 +15,6 @@
15#include <linux/seq_file.h> 15#include <linux/seq_file.h>
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17 17
18static int tty_ldiscs_read_proc(char *page, char **start, off_t off,
19 int count, int *eof, void *data);
20
21/* 18/*
22 * The /proc/tty directory inodes... 19 * The /proc/tty directory inodes...
23 */ 20 */