summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorKonstantin Dorfman <kdorfman@codeaurora.org>2015-08-02 17:06:18 +0300
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:27:11 -0700
commit6e4be0bac2555f84736170f486ecc325ff22fdcb (patch)
tree868c5cd56d7e23aa078bbe891783250f5049b85a /drivers/mmc
parent278a3d6e3fa8673cec054da4b82d0fdcb3141224 (diff)
mmc: cmdq_hci: fix platform device power management reference counting
After issuing a request the usage_count is decremented. After idle time controller irq is disabled by platform device runtime pm and request complete irq is not handled. This change moves decrement of usage_count from the end of issuing request to the end of request completion. Change-Id: I1322e0d1ab4ffbf50956fec2921c778e0dcddf36 Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/cmdq_hci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c
index 9710abab69e2..9a66420e4f87 100644
--- a/drivers/mmc/host/cmdq_hci.c
+++ b/drivers/mmc/host/cmdq_hci.c
@@ -628,7 +628,6 @@ static int cmdq_request(struct mmc_host *mmc, struct mmc_request *mrq)
cmdq_writel(cq_host, 1 << tag, CQTDBR);
out:
- cmdq_runtime_pm_put(cq_host);
return err;
}
@@ -644,6 +643,8 @@ static void cmdq_finish_data(struct mmc_host *mmc, unsigned int tag)
if (mrq->cmdq_req->cmdq_req_flags & DCMD)
cmdq_writel(cq_host, cmdq_readl(cq_host, CQ_VENDOR_CFG) |
CMDQ_SEND_STATUS_TRIGGER, CQCTL);
+
+ cmdq_runtime_pm_put(cq_host);
mrq->done(mrq);
}