From b89dae1852869d6bb3e4a8e3c6bdaf86dc2ef9da Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Mon, 26 Feb 2018 14:01:23 -0800 Subject: of: overlay: do not include path in full_name of added nodes Struct device_node full_name no longer includes the full path name when the devicetree is created from a flattened device tree (FDT). The overlay node creation code was not modified to reflect this change. Fix the node full_name generated by overlay code to contain only the basename. Unittests call an overlay internal function to create new nodes. Fix up these calls to provide basename only instead of the full path. Fixes: a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Signed-off-by: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/unittest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/of/unittest.c') diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index a17195fcaeda..62c8a8b8af2d 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -692,13 +692,13 @@ static void __init of_unittest_changeset(void) struct device_node *n1, *n2, *n21, *nchangeset, *nremove, *parent, *np; struct of_changeset chgset; - n1 = __of_node_dup(NULL, "/testcase-data/changeset/n1"); + n1 = __of_node_dup(NULL, "n1"); unittest(n1, "testcase setup failure\n"); - n2 = __of_node_dup(NULL, "/testcase-data/changeset/n2"); + n2 = __of_node_dup(NULL, "n2"); unittest(n2, "testcase setup failure\n"); - n21 = __of_node_dup(NULL, "%s/%s", "/testcase-data/changeset/n2", "n21"); + n21 = __of_node_dup(NULL, "n21"); unittest(n21, "testcase setup failure %p\n", n21); nchangeset = of_find_node_by_path("/testcase-data/changeset"); -- cgit v1.2.3-59-g8ed1b