drm/rockchip: vop: add vop full series of vop support
[firefly-linux-kernel-4.4.55.git] / drivers / of / pdt.c
index 37961b853b4136e1862728a652b4b9dbbd2d53ec..d2acae825af9928dd8aef21089f0933b42498035 100644 (file)
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_pdt.h>
-#include <asm/prom.h>
 
 static struct of_pdt_ops *of_pdt_prom_ops __initdata;
 
-void __initdata (*of_pdt_build_more)(struct device_node *dp,
-               struct device_node ***nextp);
+void __initdata (*of_pdt_build_more)(struct device_node *dp);
 
 #if defined(CONFIG_SPARC)
 unsigned int of_pdt_unique_id __initdata;
@@ -193,8 +191,7 @@ static struct device_node * __init of_pdt_create_node(phandle node,
 }
 
 static struct device_node * __init of_pdt_build_tree(struct device_node *parent,
-                                                  phandle node,
-                                                  struct device_node ***nextp)
+                                                  phandle node)
 {
        struct device_node *ret = NULL, *prev_sibling = NULL;
        struct device_node *dp;
@@ -211,16 +208,12 @@ static struct device_node * __init of_pdt_build_tree(struct device_node *parent,
                        ret = dp;
                prev_sibling = dp;
 
-               *(*nextp) = dp;
-               *nextp = &dp->allnext;
-
                dp->full_name = of_pdt_build_full_name(dp);
 
-               dp->child = of_pdt_build_tree(dp,
-                               of_pdt_prom_ops->getchild(node), nextp);
+               dp->child = of_pdt_build_tree(dp, of_pdt_prom_ops->getchild(node));
 
                if (of_pdt_build_more)
-                       of_pdt_build_more(dp, nextp);
+                       of_pdt_build_more(dp);
 
                node = of_pdt_prom_ops->getsibling(node);
        }
@@ -235,21 +228,18 @@ static void * __init kernel_tree_alloc(u64 size, u64 align)
 
 void __init of_pdt_build_devicetree(phandle root_node, struct of_pdt_ops *ops)
 {
-       struct device_node **nextp;
-
        BUG_ON(!ops);
        of_pdt_prom_ops = ops;
 
-       of_allnodes = of_pdt_create_node(root_node, NULL);
+       of_root = of_pdt_create_node(root_node, NULL);
 #if defined(CONFIG_SPARC)
-       of_allnodes->path_component_name = "";
+       of_root->path_component_name = "";
 #endif
-       of_allnodes->full_name = "/";
+       of_root->full_name = "/";
 
-       nextp = &of_allnodes->allnext;
-       of_allnodes->child = of_pdt_build_tree(of_allnodes,
-                       of_pdt_prom_ops->getchild(of_allnodes->phandle), &nextp);
+       of_root->child = of_pdt_build_tree(of_root,
+                               of_pdt_prom_ops->getchild(of_root->phandle));
 
-       /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */
+       /* Get pointer to "/chosen" and "/aliases" nodes for use everywhere */
        of_alias_scan(kernel_tree_alloc);
 }