]> Git Repo - J-u-boot.git/blobdiff - scripts/dtc/dtc-parser.y
scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc
[J-u-boot.git] / scripts / dtc / dtc-parser.y
index 66ff7f7d8eb73ca4c4a2d1275caf788741366ed3..011a5b25539a18f3882aaadbe61b228e391b00d7 100644 (file)
@@ -191,18 +191,18 @@ devicetree:
                }
        | devicetree DT_REF nodedef
                {
-                       struct node *target = get_node_by_ref($1, $2);
-
-                       if (target) {
-                               merge_nodes(target, $3);
+                       /*
+                        * We rely on the rule being always:
+                        *   versioninfo plugindecl memreserves devicetree
+                        * so $-1 is what we want (plugindecl)
+                        */
+                       if ($<flags>-1 & DTSF_PLUGIN) {
+                               add_orphan_node($1, $3, $2);
                        } else {
-                               /*
-                                * We rely on the rule being always:
-                                *   versioninfo plugindecl memreserves devicetree
-                                * so $-1 is what we want (plugindecl)
-                                */
-                               if ($<flags>-1 & DTSF_PLUGIN)
-                                       add_orphan_node($1, $3, $2);
+                               struct node *target = get_node_by_ref($1, $2);
+
+                               if (target)
+                                       merge_nodes(target, $3);
                                else
                                        ERROR(&@2, "Label or path %s not found", $2);
                        }
This page took 0.025459 seconds and 4 git commands to generate.