From: Jaehoon Chung Date: Mon, 3 Mar 2014 02:36:48 +0000 (+0900) Subject: mmc: dw_mmc: restore the card-present checking point X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=ae0eb348e13774d1119eb84ecbce224647368347;p=deliverable%2Flinux.git mmc: dw_mmc: restore the card-present checking point Restore the card-present checking point. (The following part was removed from commit bf626e5 ("mmc: dw_mmc: use slot-gpio to handle cd pin") Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 6495b733244b..d40991299218 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2113,6 +2113,11 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) #endif /* CONFIG_MMC_DW_IDMAC */ } + if (dw_mci_get_cd(mmc)) + set_bit(DW_MMC_CARD_PRESENT, &slot->flags); + else + clear_bit(DW_MMC_CARD_PRESENT, &slot->flags); + ret = mmc_add_host(mmc); if (ret) goto err_setup_bus;