diff options
Diffstat (limited to 'drivers/of/overlay.c')
-rw-r--r-- | drivers/of/overlay.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index b930e05d1215..30d91f907026 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -312,7 +312,20 @@ static int add_changeset_property(struct overlay_changeset *ovcs, * If @node has child nodes, add the children recursively via * build_changeset_next_level(). * - * NOTE: Multiple mods of created nodes not supported. + * NOTE_1: A live devicetree created from a flattened device tree (FDT) will + * not contain the full path in node->full_name. Thus an overlay + * created from an FDT also will not contain the full path in + * node->full_name. However, a live devicetree created from Open + * Firmware may have the full path in node->full_name. + * + * add_changeset_node() follows the FDT convention and does not include + * the full path in node->full_name. Even though it expects the overlay + * to not contain the full path, it uses kbasename() to remove the + * full path should it exist. It also uses kbasename() in comparisons + * to nodes in the live devicetree so that it can apply an overlay to + * a live devicetree created from Open Firmware. + * + * NOTE_2: Multiple mods of created nodes not supported. * If more than one fragment contains a node that does not already exist * in the live tree, then for each fragment of_changeset_attach_node() * will add a changeset entry to add the node. When the changeset is @@ -339,8 +352,7 @@ static int add_changeset_node(struct overlay_changeset *ovcs, break; if (!tchild) { - tchild = __of_node_dup(node, "%pOF/%s", - target_node, node_kbasename); + tchild = __of_node_dup(node, node_kbasename); if (!tchild) return -ENOMEM; |