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

Commit a74345ff authored by Amandeep Singh's avatar Amandeep Singh
Browse files

msm: qcn: Release interrupt during driver teardown



Release interrupt synchronously on driver teardown such as during
re-enumeration, manual rmmod and device power down.

Change-Id: I8a2f97266513001ed9a6c08b8ca865c9ffac9065
Signed-off-by: default avatarAmandeep Singh <amansing@codeaurora.org>
parent 53eacca7
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -560,7 +560,8 @@ static void qcn_sdio_irq_handler(struct sdio_func *func)

	sdio_claim_host(sdio_ctxt->func);
	data = sdio_readb(sdio_ctxt->func, SDIO_QCN_IRQ_STATUS, &ret);
	if (ret) {
	if (ret == -ETIMEDOUT) {
		sdio_release_irq(sdio_ctxt->func);
		sdio_release_host(sdio_ctxt->func);

		pr_err("%s: IRQ status read error ret = %d\n", __func__, ret);
@@ -770,6 +771,7 @@ static void qcn_sdio_remove(struct sdio_func *func)
	atomic_set(&xport_status, 0);
	sdio_claim_host(sdio_ctxt->func);
	qcn_enable_async_irq(false);
	sdio_release_irq(sdio_ctxt->func);
	sdio_release_host(sdio_ctxt->func);

	qcn_sdio_purge_rw_buff();
@@ -791,10 +793,6 @@ static void qcn_sdio_remove(struct sdio_func *func)
	}
	mutex_unlock(&lock);

	sdio_claim_host(sdio_ctxt->func);
	sdio_release_irq(sdio_ctxt->func);
	sdio_release_host(sdio_ctxt->func);

	kfree(sdio_ctxt);
	sdio_ctxt = NULL;
	mmc_retune_enable(current_host);