提交 6d0f5470 编写于 作者: F Frank Rowand 提交者: Rob Herring

of: overlay: loosen overly strict phandle clash check

When an overlay contains a node that already exists in
the live device tree, the overlay node is not allowed
to change the phandle of the existing node.

The existing check refused to allow an overlay node to
set the node phandle even when the existing node did
not have a phandle.  Relax the check to allow an
overlay node to set the phandle value if the existing
node does not have a phandle.
Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 87f242c1
......@@ -311,10 +311,10 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
return build_changeset_next_level(ovcs, tchild, node, 0);
}
if (node->phandle)
return -EINVAL;
ret = build_changeset_next_level(ovcs, tchild, node, 0);
if (node->phandle && tchild->phandle)
ret = -EINVAL;
else
ret = build_changeset_next_level(ovcs, tchild, node, 0);
of_node_put(tchild);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册