Set the new introduced flag to be able to check if the cdev is an
mmc/mci device.

Signed-off-by: Marco Felsch <[email protected]>
---
v2:
- only set the flag for MMC_BLK_DATA_AREA_MAIN

 drivers/mci/mci-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 017f25d35f..a160b98894 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -426,8 +426,10 @@ static void mci_part_add(struct mci *mci, uint64_t size,
        part->part_cfg = part_cfg;
        part->idx = idx;
 
-       if (area_type == MMC_BLK_DATA_AREA_MAIN)
+       if (area_type == MMC_BLK_DATA_AREA_MAIN) {
                part->blk.cdev.device_node = mci->host->hw_dev->device_node;
+               part->blk.cdev.flags |= DEVFS_IS_MCI_MAIN_PART_DEV;
+       }
 
        mci->nr_parts++;
 }
-- 
2.29.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to