]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mmc: dw_mmc: restore the card-present checking point
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 3 Mar 2014 02:36:48 +0000 (11:36 +0900)
committerChris Ball <chris@printf.net>
Mon, 12 May 2014 22:04:35 +0000 (18:04 -0400)
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 <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/dw_mmc.c

index 6495b733244bb50162590af6e6aa0f4adcfa9e03..d40991299218ba22ae749d8e557a1c168cdb3334 100644 (file)
@@ -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;