mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] MCI: init device_node for MCI mainarea cdev
Date: Tue,  8 Dec 2015 18:33:29 +0100	[thread overview]
Message-ID: <1449596009-26508-2-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1449596009-26508-1-git-send-email-l.stach@pengutronix.de>

This fixes a regression, where boards specifying the environment
path using the form device-path = &phandle, "partname:part" would
be unable to find their env.

This is due to of_find_path() switching to cdev_by_device_node()
internally, which expects the device_node member of the main
area cdev to be initialized.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/mci/mci-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 4e6b83be5f43..24f57f9da9a4 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -437,6 +437,9 @@ static void mci_part_add(struct mci *mci, uint64_t size,
 	part->area_type = area_type;
 	part->part_cfg = part_cfg;
 
+	if (area_type == MMC_BLK_DATA_AREA_MAIN)
+		part->blk.cdev.device_node = mci->host->hw_dev->device_node;
+
 	mci->nr_parts++;
 }
 
-- 
2.6.2


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

  reply	other threads:[~2015-12-08 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 17:33 [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Lucas Stach
2015-12-08 17:33 ` Lucas Stach [this message]
2015-12-10  7:52 ` 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=1449596009-26508-2-git-send-email-l.stach@pengutronix.de \
    --to=l.stach@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