From: Girish K S Date: Fri, 4 Nov 2011 10:52:47 +0000 (+0530) Subject: mmc: core: Fix setting power notify state variable for non-eMMC X-Git-Tag: next-20111114~25^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c0cf5c9b708dcb7be5635d52e65144fc0550aeb;p=karo-tx-linux.git mmc: core: Fix setting power notify state variable for non-eMMC 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 Acked-by: Ulf Hansson Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 36270449dd9d..4db73a969b6c 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -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)