of: Clear detach flag on attach
authorPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 8 Nov 2013 15:03:57 +0000 (17:03 +0200)
committerGrant Likely <grant.likely@linaro.org>
Mon, 3 Feb 2014 14:23:38 +0000 (14:23 +0000)
When attaching a node always clear the detach flag. Without this change
the sequence detach, attach fails.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/base.c

index ff85450d568399b1dec3fe6bf892c974ca28bedd..87038d80b4739126c4e3a4c08a9e82d822a51255 100644 (file)
@@ -1692,6 +1692,7 @@ int of_attach_node(struct device_node *np)
        np->allnext = of_allnodes;
        np->parent->child = np;
        of_allnodes = np;
+       of_node_clear_flag(np, OF_DETACHED);
        raw_spin_unlock_irqrestore(&devtree_lock, flags);
 
        of_add_proc_dt_entry(np);