From: xbw Date: Tue, 13 Sep 2011 07:21:33 +0000 (+0800) Subject: fix bug:It did not respond with the removal of card at the first time if you reboot... X-Git-Tag: firefly_0821_release~9767^2~27 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4310b3e54253b7feb830bde533b5f56cb535a37f;p=firefly-linux-kernel-4.4.55.git fix bug:It did not respond with the removal of card at the first time if you reboot device with card present. --- diff --git a/drivers/mmc/host/rk29_sdmmc.c b/drivers/mmc/host/rk29_sdmmc.c index 650ef1d264cf..c9ed1c8522cb 100755 --- a/drivers/mmc/host/rk29_sdmmc.c +++ b/drivers/mmc/host/rk29_sdmmc.c @@ -3046,7 +3046,14 @@ static int rk29_sdmmc_probe(struct platform_device *pdev) if(RK29_CTRL_SDMMC_ID== host->pdev->id) { - clear_bit(RK29_SDMMC_CARD_PRESENT, &host->flags); + if(rk29_sdmmc_get_cd(host->mmc)) + { + set_bit(RK29_SDMMC_CARD_PRESENT, &host->flags); + } + else + { + clear_bit(RK29_SDMMC_CARD_PRESENT, &host->flags); + } }