diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 21cf953fd53b..f93e4f936756 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2876,7 +2876,8 @@ static void mmc_blk_remove_debugfs(struct mmc_card *card, #endif /* CONFIG_DEBUG_FS */ -extern struct mmc_card *this_card; +struct mmc_card *this_card; +EXPORT_SYMBOL(this_card); static int mmc_blk_probe(struct mmc_card *card) { struct mmc_blk_data *md, *part_md; @@ -2912,7 +2913,7 @@ static int mmc_blk_probe(struct mmc_card *card) dev_set_drvdata(&card->dev, md); -#if defined(CONFIG_MMC_DW_ROCKCHIP) || defined(CONFIG_MMC_SDHCI_OF_ARASAN) +#if IS_ENABLED(CONFIG_MMC_DW_ROCKCHIP) || IS_ENABLED(CONFIG_MMC_SDHCI_OF_ARASAN) if (card->host->restrict_caps & RESTRICT_CARD_TYPE_EMMC) this_card = card; #endif diff --git a/drivers/mmc/core/block.h b/drivers/mmc/core/block.h index 31153f656f41..de6f5fdd95bc 100644 --- a/drivers/mmc/core/block.h +++ b/drivers/mmc/core/block.h @@ -17,4 +17,8 @@ struct work_struct; void mmc_blk_mq_complete_work(struct work_struct *work); +struct mmc_card; + +extern struct mmc_card *this_card; + #endif diff --git a/drivers/mmc/host/rk_sdmmc_ops.c b/drivers/mmc/host/rk_sdmmc_ops.c index 26dfac322c80..f07745d6ec5c 100644 --- a/drivers/mmc/host/rk_sdmmc_ops.c +++ b/drivers/mmc/host/rk_sdmmc_ops.c @@ -23,13 +23,13 @@ #include #include #include +#include "../core/block.h" #include "../core/card.h" #include "../core/core.h" #include "../core/mmc_ops.h" #define BLKSZ 512 -struct mmc_card *this_card = NULL; enum emmc_area_type { MMC_DATA_AREA_MAIN, MMC_DATA_AREA_BOOT1,