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>
This commit is contained in:
parent
8d8b97ba49
commit
a8ca16ea7b
14 changed files with 33 additions and 73 deletions
|
@ -67,6 +67,7 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
|
|||
struct proc_dir_entry *parent,
|
||||
const struct file_operations *proc_fops,
|
||||
void *data);
|
||||
extern void proc_remove(struct proc_dir_entry *);
|
||||
extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
|
||||
extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent);
|
||||
|
||||
|
@ -101,6 +102,7 @@ static inline struct proc_dir_entry *proc_create_data(const char *name,
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
static inline void proc_remove(struct proc_dir_entry *de) {}
|
||||
#define remove_proc_entry(name, parent) do {} while (0)
|
||||
#define remove_proc_subtree(name, parent) do {} while (0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue