diff options
| author | David Howells <dhowells@redhat.com> | 2013-04-04 17:02:03 +0100 | 
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:16:39 -0400 | 
| commit | 80e928f7ebb958f4d79d4099d1c5c0a015a23b93 (patch) | |
| tree | 5a982cc0c8574cdeea268a99901d93f27689d6e7 | |
| parent | 3cba53765bdaeef0a5ee8680b0dd4b028f3cae79 (diff) | |
| download | olio-linux-3.10-80e928f7ebb958f4d79d4099d1c5c0a015a23b93.tar.xz olio-linux-3.10-80e928f7ebb958f4d79d4099d1c5c0a015a23b93.zip  | |
proc: Kill create_proc_entry()
Kill create_proc_entry() in favour of create_proc_read_entry(), proc_create()
and proc_create_data().
Signed-off-by: David Howells <dhowells@redhat.com>
| -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 c0ad720c37b..5453f1c0b70 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -650,8 +650,9 @@ struct proc_dir_entry *proc_mkdir(const char *name,  }  EXPORT_SYMBOL(proc_mkdir); -struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, -					 struct proc_dir_entry *parent) +struct proc_dir_entry *create_proc_read_entry( +	const char *name, umode_t mode, struct proc_dir_entry *parent,  +	read_proc_t *read_proc, void *data)  {  	struct proc_dir_entry *ent; @@ -668,6 +669,8 @@ struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode,  	ent = __proc_create(&parent, name, mode, 1);  	if (ent) { +		ent->read_proc = read_proc; +		ent->data = data;  		if (proc_register(parent, ent) < 0) {  			kfree(ent);  			ent = NULL; @@ -675,7 +678,7 @@ struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode,  	}  	return ent;  } -EXPORT_SYMBOL(create_proc_entry); +EXPORT_SYMBOL(create_proc_read_entry);  struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,  					struct proc_dir_entry *parent, diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 5ae73e273e7..bcc0e10ef1d 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -109,8 +109,6 @@ extern void proc_root_init(void);  void proc_flush_task(struct task_struct *task); -extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, -						struct proc_dir_entry *parent);  struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,  				struct proc_dir_entry *parent,  				const struct file_operations *proc_fops, @@ -164,17 +162,9 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode,  	return proc_create_data(name, mode, parent, proc_fops, NULL);  } -static inline struct proc_dir_entry *create_proc_read_entry(const char *name, +extern struct proc_dir_entry *create_proc_read_entry(const char *name,  	umode_t mode, struct proc_dir_entry *base,  -	read_proc_t *read_proc, void * data) -{ -	struct proc_dir_entry *res=create_proc_entry(name,mode,base); -	if (res) { -		res->read_proc=read_proc; -		res->data=data; -	} -	return res; -} +	read_proc_t *read_proc, void *data);  extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,  	struct proc_dir_entry *parent); @@ -190,9 +180,6 @@ static inline void proc_flush_task(struct task_struct *task)  {  } -static inline struct proc_dir_entry *create_proc_entry(const char *name, -	umode_t mode, struct proc_dir_entry *parent) { return NULL; } -  #define proc_create(name, mode, parent, fops)  ({ (void)(mode), NULL; })  static inline struct proc_dir_entry *proc_create_data(const char *name,  |