9
0
Fork 0

mtd: of_mtd_fixup(): fix given DT not the default one

We have to start searching for the mtd node starting in the given root node not
the defaukt (= barebox internal) one. This means the internal DT is always
fixed up. This leads to booting not fixed up DT when using external DTs.

This patch fixes the problem.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: v2015.06.0, commit:6da925f87c66cd9132018b4b08a84fa98c382aa7
This commit is contained in:
Marc Kleine-Budde 2015-04-30 15:52:13 +02:00 committed by Jan Luebbe
parent cbded3f539
commit 294c1d0bba
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ static int of_mtd_fixup(struct device_node *root, void *ctx)
struct device_node *np, *part, *tmp;
int ret, i = 0;
np = of_find_node_by_path(mtd->of_path);
np = of_find_node_by_path_from(root, mtd->of_path);
if (!np) {
dev_err(&mtd->class_dev, "Cannot find nodepath %s, cannot fixup\n",
mtd->of_path);