summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2015-11-18 10:37:56 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:27:52 -0700
commit1fa0b8ce81f9cdc0bedda8dcde9967f6dcd85f9c (patch)
tree5814ab284717b076dc8d6b99b9752d31a6e27db7
parent6c8e3e70c92fdfe2813817c401ec05f2bc6c6a9d (diff)
mmc: core: Make sure host is active before sending pon command
Add mmc_get_card() to make sure host is resumed before sending pon command. Also, add mmc_put_card() after completing pon command so that it can release the host and also vote for runtime suspend. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Change-Id: I52f4d854388a608c6a09e55a693e3b36bd801fd8
-rw-r--r--drivers/mmc/core/mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 2f113b52e35e..fda54ff43720 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -2312,7 +2312,7 @@ int mmc_send_pon(struct mmc_card *card)
if (!mmc_can_poweroff_notify(card))
goto out;
- mmc_claim_host(host);
+ mmc_get_card(card);
if (card->pon_type & MMC_LONG_PON)
err = mmc_poweroff_notify(host->card, EXT_CSD_POWER_OFF_LONG);
else if (card->pon_type & MMC_SHRT_PON)
@@ -2320,7 +2320,7 @@ int mmc_send_pon(struct mmc_card *card)
if (err)
pr_warn("%s: error %d sending PON type %u",
mmc_hostname(host), err, card->pon_type);
- mmc_release_host(host);
+ mmc_put_card(card);
out:
return err;
}