From ee9cabbf6941e005fe42b73057051c4f300a9c02 Mon Sep 17 00:00:00 2001
From: Mikhail Lappo <mikhail.lappo@esrlabs.com>
Date: Tue, 4 Dec 2018 09:30:03 +0100
Subject: [PATCH] mmc: Add missing ifdef
Fix build when CONFIG_MMC_WRITE is not
defined. The struct field erase_grp_size
is under the same ifdef
Signed-off-by: Mikhail Lappo <mikhail.lappo@esrlabs.com>
---
drivers/mmc/mmc.c | 2 ++
1 file changed, 2 insertions(+)
@@ -1066,9 +1066,11 @@ int mmc_hwpart_config(struct mmc *mmc,
ext_csd[EXT_CSD_ERASE_GROUP_DEF] = 1;
+#if CONFIG_IS_ENABLED(MMC_WRITE)
/* update erase group size to be high-capacity */
mmc->erase_grp_size =
ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * 1024;
+#endif
}
--
2.7.4