aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-12 12:27:28 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:46 -0400
commita8ca16ea7b0abb0a7e49492d1123b715f0ec62e8 (patch)
treefe201353c71385cab2f3cc0d7235c76121f51789 /include
parent8d8b97ba499cb69fccb5fd9f2b439e3265fc3f27 (diff)
proc: Supply a function to remove a proc entry by PDE
Supply a function (proc_remove()) to remove a proc entry (and any subtree rooted there) by proc_dir_entry pointer rather than by name and (optionally) root dir entry pointer. This allows us to eliminate all remaining pde->name accesses outside of procfs. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Grant Likely <grant.likely@linaro.or> cc: linux-acpi@vger.kernel.org cc: openipmi-developer@lists.sourceforge.net cc: devicetree-discuss@lists.ozlabs.org cc: linux-pci@vger.kernel.org cc: netdev@vger.kernel.org cc: netfilter-devel@vger.kernel.org cc: alsa-devel@alsa-project.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/proc_fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index bae820742341..cb78d5be6859 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -67,6 +67,7 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
67 struct proc_dir_entry *parent, 67 struct proc_dir_entry *parent,
68 const struct file_operations *proc_fops, 68 const struct file_operations *proc_fops,
69 void *data); 69 void *data);
70extern void proc_remove(struct proc_dir_entry *);
70extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); 71extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
71extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent); 72extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent);
72 73
@@ -101,6 +102,7 @@ static inline struct proc_dir_entry *proc_create_data(const char *name,
101{ 102{
102 return NULL; 103 return NULL;
103} 104}
105static inline void proc_remove(struct proc_dir_entry *de) {}
104#define remove_proc_entry(name, parent) do {} while (0) 106#define remove_proc_entry(name, parent) do {} while (0)
105#define remove_proc_subtree(name, parent) do {} while (0) 107#define remove_proc_subtree(name, parent) do {} while (0)
106 108