mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Acked-by: Grant Likely <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
8d8b97ba49
commit
a8ca16ea7b
14 changed files with 33 additions and 73 deletions
|
|
@ -1452,16 +1452,7 @@ int of_attach_node(struct device_node *np)
|
|||
#ifdef CONFIG_PROC_DEVICETREE
|
||||
static void of_remove_proc_dt_entry(struct device_node *dn)
|
||||
{
|
||||
struct device_node *parent = dn->parent;
|
||||
struct property *prop = dn->properties;
|
||||
|
||||
while (prop) {
|
||||
remove_proc_entry(prop->name, dn->pde);
|
||||
prop = prop->next;
|
||||
}
|
||||
|
||||
if (dn->pde)
|
||||
remove_proc_entry(dn->pde->name, parent->pde);
|
||||
proc_remove(dn->pde);
|
||||
}
|
||||
#else
|
||||
static void of_remove_proc_dt_entry(struct device_node *dn)
|
||||
|
|
|
|||
Loading…
Reference in a new issue