summaryrefslogtreecommitdiff
path: root/fs/proc/proc_devtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_devtree.c')
-rw-r--r--fs/proc/proc_devtree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index c82dd5147845..106a83570630 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -14,13 +14,16 @@
#include <linux/of.h>
#include <linux/export.h>
#include <linux/slab.h>
+#include <asm/prom.h>
#include <asm/uaccess.h>
#include "internal.h"
static inline void set_node_proc_entry(struct device_node *np,
struct proc_dir_entry *de)
{
+#ifdef HAVE_ARCH_DEVTREE_FIXUPS
np->pde = de;
+#endif
}
static struct proc_dir_entry *proc_device_tree;
@@ -74,9 +77,9 @@ __proc_device_tree_add_prop(struct proc_dir_entry *de, struct property *pp,
return NULL;
if (!strncmp(name, "security-", 9))
- proc_set_size(ent, 0); /* don't leak number of password chars */
+ ent->size = 0; /* don't leak number of password chars */
else
- proc_set_size(ent, pp->length);
+ ent->size = pp->length;
return ent;
}
@@ -232,7 +235,6 @@ void __init proc_device_tree_init(void)
return;
root = of_find_node_by_path("/");
if (root == NULL) {
- remove_proc_entry("device-tree", NULL);
pr_debug("/proc/device-tree: can't find root\n");
return;
}