diff mbox

dmaengine: dw: don't handle interrupt when dmaengine is not used

Message ID 1425535688-1726-1-git-send-email-yang.jie@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jie, Yang March 5, 2015, 6:08 a.m. UTC
When dma controller is not used by any user and set off,
we should disble interrupt handler, at least the interrupt
reset part, for some subsystem, e.g. ADSP, may use the
dma in its own logic, here reset the interrupt may make
this subsystem work abnormally.

Signed-off-by: Jie Yang <yang.jie@intel.com>
---
 drivers/dma/dw/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul March 5, 2015, 8:38 a.m. UTC | #1
On Thu, Mar 05, 2015 at 02:08:08PM +0800, Jie Yang wrote:
> When dma controller is not used by any user and set off,
> we should disble interrupt handler, at least the interrupt
> reset part, for some subsystem, e.g. ADSP, may use the
> dma in its own logic, here reset the interrupt may make
> this subsystem work abnormally.
> 
Applied, thanks
diff mbox

Patch

diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 3804785..ac0d6f6 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -619,7 +619,7 @@  static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
 	dev_vdbg(dw->dma.dev, "%s: status=0x%x\n", __func__, status);
 
 	/* Check if we have any interrupt from the DMAC */
-	if (!status)
+	if (!status || !dw->in_use)
 		return IRQ_NONE;
 
 	/*