]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: core: Fix setting power notify state variable for non-eMMC
authorGirish K S <girish.shivananjappa@linaro.org>
Fri, 4 Nov 2011 10:52:47 +0000 (16:22 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 15 Nov 2011 13:07:58 +0000 (08:07 -0500)
This patch skips the setting of the power notify state variable
for non eMMC 4.5 devices. Also fixes the problem of omap_hsmmc
noisy/broken for suspend resume reported by Kevin Hilman.

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/mmc.c

index 36270449dd9d24c20167484bfbeb70b7b9f4e6d4..4db73a969b6c8cb2a7cc1c13a1c70e824725a9c8 100644 (file)
@@ -882,10 +882,14 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                                 card->ext_csd.generic_cmd6_time);
                if (err && err != -EBADMSG)
                        goto free_card;
-       }
 
-       if (!err)
-               card->poweroff_notify_state = MMC_POWERED_ON;
+               /*
+                * The err can be -EBADMSG or 0,
+                * so check for success and update the flag
+                */
+               if (!err)
+                       card->poweroff_notify_state = MMC_POWERED_ON;
+       }
 
        /*
         * Activate high speed (if supported)