diff options
-rw-r--r-- | fs/proc/generic.c | 9 | ||||
-rw-r--r-- | include/linux/proc_fs.h | 17 |
2 files changed, 8 insertions, 18 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index c0ad720c37b9..5453f1c0b70c 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -650,8 +650,9 @@ struct proc_dir_entry *proc_mkdir(const char *name, | |||
650 | } | 650 | } |
651 | EXPORT_SYMBOL(proc_mkdir); | 651 | EXPORT_SYMBOL(proc_mkdir); |
652 | 652 | ||
653 | struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, | 653 | struct proc_dir_entry *create_proc_read_entry( |
654 | struct proc_dir_entry *parent) | 654 | const char *name, umode_t mode, struct proc_dir_entry *parent, |
655 | read_proc_t *read_proc, void *data) | ||
655 | { | 656 | { |
656 | struct proc_dir_entry *ent; | 657 | struct proc_dir_entry *ent; |
657 | 658 | ||
@@ -668,6 +669,8 @@ struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, | |||
668 | 669 | ||
669 | ent = __proc_create(&parent, name, mode, 1); | 670 | ent = __proc_create(&parent, name, mode, 1); |
670 | if (ent) { | 671 | if (ent) { |
672 | ent->read_proc = read_proc; | ||
673 | ent->data = data; | ||
671 | if (proc_register(parent, ent) < 0) { | 674 | if (proc_register(parent, ent) < 0) { |
672 | kfree(ent); | 675 | kfree(ent); |
673 | ent = NULL; | 676 | ent = NULL; |
@@ -675,7 +678,7 @@ struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, | |||
675 | } | 678 | } |
676 | return ent; | 679 | return ent; |
677 | } | 680 | } |
678 | EXPORT_SYMBOL(create_proc_entry); | 681 | EXPORT_SYMBOL(create_proc_read_entry); |
679 | 682 | ||
680 | struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, | 683 | struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, |
681 | struct proc_dir_entry *parent, | 684 | struct proc_dir_entry *parent, |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 5ae73e273e7e..bcc0e10ef1df 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -109,8 +109,6 @@ extern void proc_root_init(void); | |||
109 | 109 | ||
110 | void proc_flush_task(struct task_struct *task); | 110 | void proc_flush_task(struct task_struct *task); |
111 | 111 | ||
112 | extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, | ||
113 | struct proc_dir_entry *parent); | ||
114 | struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, | 112 | struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, |
115 | struct proc_dir_entry *parent, | 113 | struct proc_dir_entry *parent, |
116 | const struct file_operations *proc_fops, | 114 | const struct file_operations *proc_fops, |
@@ -164,17 +162,9 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, | |||
164 | return proc_create_data(name, mode, parent, proc_fops, NULL); | 162 | return proc_create_data(name, mode, parent, proc_fops, NULL); |
165 | } | 163 | } |
166 | 164 | ||
167 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 165 | extern struct proc_dir_entry *create_proc_read_entry(const char *name, |
168 | umode_t mode, struct proc_dir_entry *base, | 166 | umode_t mode, struct proc_dir_entry *base, |
169 | read_proc_t *read_proc, void * data) | 167 | read_proc_t *read_proc, void *data); |
170 | { | ||
171 | struct proc_dir_entry *res=create_proc_entry(name,mode,base); | ||
172 | if (res) { | ||
173 | res->read_proc=read_proc; | ||
174 | res->data=data; | ||
175 | } | ||
176 | return res; | ||
177 | } | ||
178 | 168 | ||
179 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 169 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
180 | struct proc_dir_entry *parent); | 170 | struct proc_dir_entry *parent); |
@@ -190,9 +180,6 @@ static inline void proc_flush_task(struct task_struct *task) | |||
190 | { | 180 | { |
191 | } | 181 | } |
192 | 182 | ||
193 | static inline struct proc_dir_entry *create_proc_entry(const char *name, | ||
194 | umode_t mode, struct proc_dir_entry *parent) { return NULL; } | ||
195 | |||
196 | #define proc_create(name, mode, parent, fops) ({ (void)(mode), NULL; }) | 183 | #define proc_create(name, mode, parent, fops) ({ (void)(mode), NULL; }) |
197 | 184 | ||
198 | static inline struct proc_dir_entry *proc_create_data(const char *name, | 185 | static inline struct proc_dir_entry *proc_create_data(const char *name, |