fix bug:It did not respond with the removal of card at the first time if you reboot...
authorxbw <xbw@rock-chips.com>
Tue, 13 Sep 2011 07:21:33 +0000 (15:21 +0800)
committerxbw <xbw@rock-chips.com>
Tue, 13 Sep 2011 07:23:33 +0000 (15:23 +0800)
drivers/mmc/host/rk29_sdmmc.c

index 650ef1d264cf67e6a2321723cc78d6ad709c5037..c9ed1c8522cb1b415e7c356cc678fb30b9296ca8 100755 (executable)
@@ -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);
+        }
     }