]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/sparc64/kernel/prom.c
Consolidate of_find_node_by routines
[karo-tx-linux.git] / arch / sparc64 / kernel / prom.c
index ee96ef61bc997cac31dc6dd4bae860599550774d..2b2017ce2267b8e973f160e2b5c16bcf6002ecd2 100644 (file)
 #include <asm/upa.h>
 #include <asm/smp.h>
 
-static struct device_node *allnodes;
+extern struct device_node *allnodes;   /* temporary while merging */
 
 extern rwlock_t devtree_lock;  /* temporary while merging */
 
-struct device_node *of_find_node_by_path(const char *path)
-{
-       struct device_node *np = allnodes;
-
-       for (; np != 0; np = np->allnext) {
-               if (np->full_name != 0 && strcmp(np->full_name, path) == 0)
-                       break;
-       }
-
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_path);
-
 struct device_node *of_find_node_by_phandle(phandle handle)
 {
        struct device_node *np;
@@ -59,52 +46,6 @@ struct device_node *of_find_node_by_phandle(phandle handle)
 }
 EXPORT_SYMBOL(of_find_node_by_phandle);
 
-struct device_node *of_find_node_by_name(struct device_node *from,
-       const char *name)
-{
-       struct device_node *np;
-
-       np = from ? from->allnext : allnodes;
-       for (; np != NULL; np = np->allnext)
-               if (np->name != NULL && strcmp(np->name, name) == 0)
-                       break;
-
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_name);
-
-struct device_node *of_find_node_by_type(struct device_node *from,
-       const char *type)
-{
-       struct device_node *np;
-
-       np = from ? from->allnext : allnodes;
-       for (; np != 0; np = np->allnext)
-               if (np->type != 0 && strcmp(np->type, type) == 0)
-                       break;
-
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_type);
-
-struct device_node *of_find_compatible_node(struct device_node *from,
-       const char *type, const char *compatible)
-{
-       struct device_node *np;
-
-       np = from ? from->allnext : allnodes;
-       for (; np != 0; np = np->allnext) {
-               if (type != NULL
-                   && !(np->type != 0 && strcmp(np->type, type) == 0))
-                       continue;
-               if (of_device_is_compatible(np, compatible))
-                       break;
-       }
-
-       return np;
-}
-EXPORT_SYMBOL(of_find_compatible_node);
-
 int of_getintprop_default(struct device_node *np, const char *name, int def)
 {
        struct property *prop;