mmc: msm_sdcc: Hold sdio wake_lock till end of lpm sequence.

The sdiowakeup irq handler turns on the clock and takes sdio
wake_lock, but the wake_lock is set to expire on any msmsdcc_request
even before sdio_al has had a chance to finish the lpm disable
sequence. This causes power drain if the system enters suspend, hence
hold the sdio wake_lock till sdio_al is finished lpm disable sequence.
This change is only applicable to sdio_al clients.

Change-Id: I10c00059c3d071b90a81cb8f7664eedf4e772d8a
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 4c6c8b8..612726c 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -4286,7 +4286,6 @@
 			enable_irq(host->core_irqres->start);
 			host->sdcc_irq_disabled = 0;
 		}
-		wake_lock_timeout(&host->sdio_wlock, 1);
 	}
 	spin_unlock_irqrestore(&host->lock, flags);
 	return 0;
diff --git a/drivers/mmc/host/msm_sdcc.h b/drivers/mmc/host/msm_sdcc.h
index 2019913..580da82 100644
--- a/drivers/mmc/host/msm_sdcc.h
+++ b/drivers/mmc/host/msm_sdcc.h
@@ -374,7 +374,12 @@
 
 static inline int msmsdcc_lpm_disable(struct mmc_host *mmc)
 {
-	return msmsdcc_sdio_al_lpm(mmc, false);
+	struct msmsdcc_host *host = mmc_priv(mmc);
+	int ret;
+
+	ret = msmsdcc_sdio_al_lpm(mmc, false);
+	wake_unlock(&host->sdio_wlock);
+	return ret;
 }
 #endif