diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-26 13:49:19 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-02-06 09:39:10 +0100 |
commit | 3793ac5f987fada4bcfe5327b3c06b68a2a535e7 (patch) | |
tree | b2c830e7077d13e5464f710596bd28fc2ce323cb /drivers | |
parent | bc95e7a96330aa11ff1a094d035a434fd8db6b23 (diff) | |
download | barebox-3793ac5f987fada4bcfe5327b3c06b68a2a535e7.tar.gz barebox-3793ac5f987fada4bcfe5327b3c06b68a2a535e7.tar.xz |
of: mtd: partition: Use reproducible node names for fixup
The full names of device nodes are not as stable as we like them
to be. Lately the leading zeroes in the i.MX6 device trees were
removed which led to the result that we can no longer find the
partition nodes in the to be fixed tree. Use reproducible names
to overcome this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/partition.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c index ac20490231..6f9651a9e4 100644 --- a/drivers/of/partition.c +++ b/drivers/of/partition.c @@ -130,6 +130,7 @@ static int of_partition_fixup(struct device_node *root, void *ctx) { struct cdev *cdev = ctx, *partcdev; struct device_node *np, *part, *partnode; + char *name; int ret; int n_cells, n_parts = 0; @@ -153,7 +154,9 @@ static int of_partition_fixup(struct device_node *root, void *ctx) else n_cells = 1; - np = of_find_node_by_path_from(root, cdev->device_node->full_name); + name = of_get_reproducible_name(cdev->device_node); + np = of_find_node_by_reproducible_name(root, name); + free(name); if (!np) { dev_err(cdev->dev, "Cannot find nodepath %s, cannot fixup\n", cdev->device_node->full_name); |