summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/core.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-04-30 16:21:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-01 08:40:44 +0200
commit6da925f87c66cd9132018b4b08a84fa98c382aa7 (patch)
tree07012ee9ad59a5c849151b8f4b1d75a44874a88f /drivers/mtd/core.c
parentd098f2cf6f7634a01cb50f68787f0aacae63dad8 (diff)
downloadbarebox-6da925f87c66cd9132018b4b08a84fa98c382aa7.tar.gz
barebox-6da925f87c66cd9132018b4b08a84fa98c382aa7.tar.xz
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> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/core.c')
-rw-r--r--drivers/mtd/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 63b1e4a824..0197d2c8a3 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -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);