[PATCH v3 2/3] mci: mci-core: set the DEVFS_IS_MCI_MAIN_PART_DEV flag
Marco Felsch
m.felsch at pengutronix.de
Mon May 10 03:25:22 PDT 2021
Set the new introduced flag to be able to check if the cdev is an
mmc/mci device.
Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
---
v3:
- no changes
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
More information about the barebox
mailing list