From d37f1284dee584ff28439f90f9275e44e4ad5535 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 8 Dec 2015 18:33:29 +0100 Subject: MCI: init device_node for MCI mainarea cdev 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 Signed-off-by: Sascha Hauer --- drivers/mci/mci-core.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/mci') diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 4e6b83be5f..24f57f9da9 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++; } -- cgit v1.2.3