Allow nodes to be referenced by path at the top level.

When nodes are modified by merging device trees, nodes to be updated/merged can
be specified by a label. Specifying nodes by full path (instead of label)
doesn't quite work. This patch fixes that.

Signed-off-by: John Bonesio <bones@secretlab.ca>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
John Bonesio 2010-11-02 15:55:04 -07:00 committed by Jon Loeliger
parent c0fa2e6d4e
commit 73ae43ea44
4 changed files with 46 additions and 4 deletions

View file

@ -131,13 +131,12 @@ devicetree:
}
| devicetree DT_REF nodedef
{
struct node *target;
struct node *target = get_node_by_ref($1, $2);
target = get_node_by_label($1, $2);
if (target)
merge_nodes(target, $3);
else
print_error("label, '%s' not found", $2);
print_error("label or path, '%s', not found", $2);
$$ = $1;
}
;