mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] mtd: of_mtd_fixup(): fix given DT not the default one
Date: Thu, 30 Apr 2015 16:21:18 +0200	[thread overview]
Message-ID: <1430403678-31458-1-git-send-email-mkl@pengutronix.de> (raw)

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>
---
 drivers/mtd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 63b1e4a824fa..0197d2c8a3e1 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);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-04-30 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 14:21 Marc Kleine-Budde [this message]
2015-04-30 16:29 ` Uwe Kleine-König
2015-05-01  6:41 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430403678-31458-1-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox