From patchwork Fri Jan 17 06:06:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 239690 List-Id: U-Boot discussion From: jh80.chung at samsung.com (Jaehoon Chung) Date: Fri, 17 Jan 2020 15:06:54 +0900 Subject: [PATCH] mmc: fix the build error when MMC_WRITE is disabled References: Message-ID: <20200117060654.18351-1-jh80.chung@samsung.com> erase_grp_size is used, when MMC_WRITE is enabled. - error: ‘struct mmc’ has no member named ‘erase_grp_size’ Signed-off-by: Jaehoon Chung Reviewed-by: Peng Fan --- drivers/mmc/mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index d43983d4a6..6a2b855435 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1126,9 +1126,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 }