aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/prom.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/prom.c')
-rw-r--r--arch/sparc64/kernel/prom.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index c99b7aae19df..fd46e94ce06b 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -63,6 +63,32 @@ struct device_node *of_find_node_by_path(const char *path)
63 return np; 63 return np;
64} 64}
65 65
66struct device_node *of_find_node_by_name(struct device_node *from,
67 const char *name)
68{
69 struct device_node *np;
70
71 np = from ? from->allnext : allnodes;
72 for (; np != NULL; np = np->allnext)
73 if (np->name != NULL && strcmp(np->name, name) == 0)
74 break;
75
76 return np;
77}
78
79struct device_node *of_find_node_by_type(struct device_node *from,
80 const char *type)
81{
82 struct device_node *np;
83
84 np = from ? from->allnext : allnodes;
85 for (; np != 0; np = np->allnext)
86 if (np->type != 0 && strcmp(np->type, type) == 0)
87 break;
88
89 return np;
90}
91
66struct property *of_find_property(struct device_node *np, const char *name, 92struct property *of_find_property(struct device_node *np, const char *name,
67 int *lenp) 93 int *lenp)
68{ 94{