aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
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 /drivers/of
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 'drivers/of')
-rw-r--r--drivers/of/base.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 321d3ef05006..9c704369eda8 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1452,16 +1452,7 @@ int of_attach_node(struct device_node *np)
1452#ifdef CONFIG_PROC_DEVICETREE 1452#ifdef CONFIG_PROC_DEVICETREE
1453static void of_remove_proc_dt_entry(struct device_node *dn) 1453static void of_remove_proc_dt_entry(struct device_node *dn)
1454{ 1454{
1455 struct device_node *parent = dn->parent; 1455 proc_remove(dn->pde);
1456 struct property *prop = dn->properties;
1457
1458 while (prop) {
1459 remove_proc_entry(prop->name, dn->pde);
1460 prop = prop->next;
1461 }
1462
1463 if (dn->pde)
1464 remove_proc_entry(dn->pde->name, parent->pde);
1465} 1456}
1466#else 1457#else
1467static void of_remove_proc_dt_entry(struct device_node *dn) 1458static void of_remove_proc_dt_entry(struct device_node *dn)