aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2008-04-29 04:01:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:19 -0400
commit8731f14d37825b54ad0c4c309cba2bc8fdf13a86 (patch)
tree6f0d6d646ad6c1c5b4765953fea004c1758961be
parent352ced8e594091d74b92da9bcf07aea81d37ac55 (diff)
proc: remove ->get_info infrastructure
Now that last dozen or so users of ->get_info were removed, ditch it too. Everyone sane shouldd have switched to seq_file interface long ago. P.S.: Co-existing 3 interfaces (->get_info/->read_proc/->proc_fops) for proc is long-standing crap, BTW, thus a) put ->read_proc/->write_proc/read_proc_entry() users on death row, b) new such users should be rejected, c) everyone is encouraged to convert his favourite ->read_proc user or I'll do it, lazy bastards. 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.c7
-rw-r--r--include/linux/proc_fs.h15
2 files changed, 2 insertions, 20 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 8b406e21a258..0f3d97d41b0f 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -69,12 +69,7 @@ proc_file_read(struct file *file, char __user *buf, size_t nbytes,
69 count = min_t(size_t, PROC_BLOCK_SIZE, nbytes); 69 count = min_t(size_t, PROC_BLOCK_SIZE, nbytes);
70 70
71 start = NULL; 71 start = NULL;
72 if (dp->get_info) { 72 if (dp->read_proc) {
73 /* Handle old net routines */
74 n = dp->get_info(page, &start, *ppos, count);
75 if (n < count)
76 eof = 1;
77 } else if (dp->read_proc) {
78 /* 73 /*
79 * How to be a proc read function 74 * How to be a proc read function
80 * ------------------------------ 75 * ------------------------------
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 2183ffdc5489..29abcb805754 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -40,7 +40,7 @@ enum {
40 * /proc file has a parent, but "subdir" is NULL for all 40 * /proc file has a parent, but "subdir" is NULL for all
41 * non-directory entries). 41 * non-directory entries).
42 * 42 *
43 * "get_info" is called at "read", while "owner" is used to protect module 43 * "owner" is used to protect module
44 * from unloading while proc_dir_entry is in use 44 * from unloading while proc_dir_entry is in use
45 */ 45 */
46 46
@@ -48,7 +48,6 @@ typedef int (read_proc_t)(char *page, char **start, off_t off,
48 int count, int *eof, void *data); 48 int count, int *eof, void *data);
49typedef int (write_proc_t)(struct file *file, const char __user *buffer, 49typedef int (write_proc_t)(struct file *file, const char __user *buffer,
50 unsigned long count, void *data); 50 unsigned long count, void *data);
51typedef int (get_info_t)(char *, char **, off_t, int);
52 51
53struct proc_dir_entry { 52struct proc_dir_entry {
54 unsigned int low_ino; 53 unsigned int low_ino;
@@ -69,7 +68,6 @@ struct proc_dir_entry {
69 * somewhere. 68 * somewhere.
70 */ 69 */
71 const struct file_operations *proc_fops; 70 const struct file_operations *proc_fops;
72 get_info_t *get_info;
73 struct module *owner; 71 struct module *owner;
74 struct proc_dir_entry *next, *parent, *subdir; 72 struct proc_dir_entry *next, *parent, *subdir;
75 void *data; 73 void *data;
@@ -187,14 +185,6 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
187 return res; 185 return res;
188} 186}
189 187
190static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
191 mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
192{
193 struct proc_dir_entry *res=create_proc_entry(name,mode,base);
194 if (res) res->get_info=get_info;
195 return res;
196}
197
198extern struct proc_dir_entry *proc_net_fops_create(struct net *net, 188extern struct proc_dir_entry *proc_net_fops_create(struct net *net,
199 const char *name, mode_t mode, const struct file_operations *fops); 189 const char *name, mode_t mode, const struct file_operations *fops);
200extern void proc_net_remove(struct net *net, const char *name); 190extern void proc_net_remove(struct net *net, const char *name);
@@ -234,9 +224,6 @@ static inline struct proc_dir_entry *proc_mkdir(const char *name,
234static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 224static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
235 mode_t mode, struct proc_dir_entry *base, 225 mode_t mode, struct proc_dir_entry *base,
236 read_proc_t *read_proc, void * data) { return NULL; } 226 read_proc_t *read_proc, void * data) { return NULL; }
237static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
238 mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
239 { return NULL; }
240 227
241struct tty_driver; 228struct tty_driver;
242static inline void proc_tty_register_driver(struct tty_driver *driver) {}; 229static inline void proc_tty_register_driver(struct tty_driver *driver) {};