]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Fix build when CONFIG_W1_MASTER_GPIO=m b exporting "allnodes"
authorRandy Dunlap <rdunlap@infradead.org>
Fri, 30 Nov 2012 10:01:51 +0000 (10:01 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 30 Nov 2012 10:04:06 +0000 (10:04 +0000)
ERROR: "allnodes" [drivers/w1/masters/w1-gpio.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
[grant.likely: allnodes is too generic; rename to of_allnodes]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Ville Syrjala <syrjala@sci.fi>
arch/arm/mach-vexpress/v2m.c
drivers/of/base.c
drivers/of/fdt.c
drivers/of/pdt.c
include/linux/of.h

index 560e0df728f89931826f080cfe87dda6abcec128..359f782c747d85c17abf6592474f24bb337be8da 100644 (file)
@@ -589,7 +589,7 @@ void __init v2m_dt_init_early(void)
                return;
 
        /* Confirm board type against DT property, if available */
-       if (of_property_read_u32(allnodes, "arm,hbi", &dt_hbi) == 0) {
+       if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) {
                int site = v2m_get_master_site();
                u32 id = readl(v2m_sysreg_base + (site == SYS_CFG_SITE_DB2 ?
                                V2M_SYS_PROCID1 : V2M_SYS_PROCID0));
index c3724110a2888179512074da056a048c5b71db7b..538e3cfad23e20c1dfca368a1e85adc53920c574 100644 (file)
@@ -45,7 +45,8 @@ struct alias_prop {
 
 static LIST_HEAD(aliases_lookup);
 
-struct device_node *allnodes;
+struct device_node *of_allnodes;
+EXPORT_SYMBOL(of_allnodes);
 struct device_node *of_chosen;
 struct device_node *of_aliases;
 
@@ -199,7 +200,7 @@ struct device_node *of_find_all_nodes(struct device_node *prev)
        struct device_node *np;
 
        read_lock(&devtree_lock);
-       np = prev ? prev->allnext : allnodes;
+       np = prev ? prev->allnext : of_allnodes;
        for (; np != NULL; np = np->allnext)
                if (of_node_get(np))
                        break;
@@ -422,7 +423,7 @@ EXPORT_SYMBOL(of_get_child_by_name);
  */
 struct device_node *of_find_node_by_path(const char *path)
 {
-       struct device_node *np = allnodes;
+       struct device_node *np = of_allnodes;
 
        read_lock(&devtree_lock);
        for (; np; np = np->allnext) {
@@ -452,7 +453,7 @@ struct device_node *of_find_node_by_name(struct device_node *from,
        struct device_node *np;
 
        read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
+       np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext)
                if (np->name && (of_node_cmp(np->name, name) == 0)
                    && of_node_get(np))
@@ -481,7 +482,7 @@ struct device_node *of_find_node_by_type(struct device_node *from,
        struct device_node *np;
 
        read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
+       np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext)
                if (np->type && (of_node_cmp(np->type, type) == 0)
                    && of_node_get(np))
@@ -512,7 +513,7 @@ struct device_node *of_find_compatible_node(struct device_node *from,
        struct device_node *np;
 
        read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
+       np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext) {
                if (type
                    && !(np->type && (of_node_cmp(np->type, type) == 0)))
@@ -545,7 +546,7 @@ struct device_node *of_find_node_with_property(struct device_node *from,
        struct property *pp;
 
        read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
+       np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext) {
                for (pp = np->properties; pp; pp = pp->next) {
                        if (of_prop_cmp(pp->name, prop_name) == 0) {
@@ -616,7 +617,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
                *match = NULL;
 
        read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
+       np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext) {
                if (of_match_node(matches, np) && of_node_get(np)) {
                        if (match)
@@ -669,7 +670,7 @@ struct device_node *of_find_node_by_phandle(phandle handle)
        struct device_node *np;
 
        read_lock(&devtree_lock);
-       for (np = allnodes; np; np = np->allnext)
+       for (np = of_allnodes; np; np = np->allnext)
                if (np->phandle == handle)
                        break;
        of_node_get(np);
@@ -1254,9 +1255,9 @@ void of_attach_node(struct device_node *np)
 
        write_lock_irqsave(&devtree_lock, flags);
        np->sibling = np->parent->child;
-       np->allnext = allnodes;
+       np->allnext = of_allnodes;
        np->parent->child = np;
-       allnodes = np;
+       of_allnodes = np;
        write_unlock_irqrestore(&devtree_lock, flags);
 }
 
@@ -1277,11 +1278,11 @@ void of_detach_node(struct device_node *np)
        if (!parent)
                goto out_unlock;
 
-       if (allnodes == np)
-               allnodes = np->allnext;
+       if (of_allnodes == np)
+               of_allnodes = np->allnext;
        else {
                struct device_node *prev;
-               for (prev = allnodes;
+               for (prev = of_allnodes;
                     prev->allnext != np;
                     prev = prev->allnext)
                        ;
index e36ff40011f4449ecceece7c89f2b1f1278fceb7..a65c39c473bf36368493bd794222ab45d328706c 100644 (file)
@@ -712,7 +712,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
  */
 void __init unflatten_device_tree(void)
 {
-       __unflatten_device_tree(initial_boot_params, &allnodes,
+       __unflatten_device_tree(initial_boot_params, &of_allnodes,
                                early_init_dt_alloc_memory_arch);
 
        /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */
index 07cc1d678e4d3da7d810c330c8bb4053411bd885..37b56fd716e6683e97cfcc4c381e7246d86d77ee 100644 (file)
@@ -241,15 +241,15 @@ void __init of_pdt_build_devicetree(phandle root_node, struct of_pdt_ops *ops)
        BUG_ON(!ops);
        of_pdt_prom_ops = ops;
 
-       allnodes = of_pdt_create_node(root_node, NULL);
+       of_allnodes = of_pdt_create_node(root_node, NULL);
 #if defined(CONFIG_SPARC)
-       allnodes->path_component_name = "";
+       of_allnodes->path_component_name = "";
 #endif
-       allnodes->full_name = "/";
+       of_allnodes->full_name = "/";
 
-       nextp = &allnodes->allnext;
-       allnodes->child = of_pdt_build_tree(allnodes,
-                       of_pdt_prom_ops->getchild(allnodes->phandle), &nextp);
+       nextp = &of_allnodes->allnext;
+       of_allnodes->child = of_pdt_build_tree(of_allnodes,
+                       of_pdt_prom_ops->getchild(of_allnodes->phandle), &nextp);
 
        /* Get pointer to "/chosen" and "/aliasas" nodes for use everywhere */
        of_alias_scan(kernel_tree_alloc);
index 7337dc109c8972cf30e9e0529d4240d10bebbd7f..60053bd7e79a8c835099c474aad86c030754a3ac 100644 (file)
@@ -88,14 +88,14 @@ static inline void of_node_put(struct device_node *node) { }
 #ifdef CONFIG_OF
 
 /* Pointer for first entry in chain of all nodes. */
-extern struct device_node *allnodes;
+extern struct device_node *of_allnodes;
 extern struct device_node *of_chosen;
 extern struct device_node *of_aliases;
 extern rwlock_t devtree_lock;
 
 static inline bool of_have_populated_dt(void)
 {
-       return allnodes != NULL;
+       return of_allnodes != NULL;
 }
 
 static inline bool of_node_is_root(const struct device_node *node)