Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e2387f7 authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

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: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent 5aa789d4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
}