diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2015-12-08 18:33:29 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-12-10 08:51:58 +0100 |
commit | d37f1284dee584ff28439f90f9275e44e4ad5535 (patch) | |
tree | d7bedb9691e118678a1a073e38632f115ca2c0a4 | |
parent | 21854348c8796469f0f3db5bc25c620175a988db (diff) | |
download | barebox-d37f1284dee584ff28439f90f9275e44e4ad5535.tar.gz barebox-d37f1284dee584ff28439f90f9275e44e4ad5535.tar.xz |
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 <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mci/mci-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
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++; } |