From faf0e3c356693cc6d0976562bd5f0784b4c8b5dd Mon Sep 17 00:00:00 2001 From: xbw Date: Tue, 13 Sep 2011 15:21:33 +0800 Subject: [PATCH] fix bug:It did not respond with the removal of card at the first time if you reboot reboot with card present. --- drivers/mmc/host/rk29_sdmmc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); + } } -- 2.34.1