From 0a0aee203c202e946a1e7dee3d40714dbab951a4 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 27 May 2013 15:14:39 +0300 Subject: [PATCH] tegra20-apb-dma: remove useless use of lock Accordingly to dma_cookie_status() description locking is not required. Signed-off-by: Andy Shevchenko Cc: Stephen Warren Cc: linux-tegra@vger.kernel.org Signed-off-by: Vinod Koul --- drivers/dma/tegra20-apb-dma.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index f137914d7b16..5d4986e5f5fa 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -767,13 +767,11 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc, unsigned long flags; unsigned int residual; - spin_lock_irqsave(&tdc->lock, flags); - ret = dma_cookie_status(dc, cookie, txstate); - if (ret == DMA_SUCCESS) { - spin_unlock_irqrestore(&tdc->lock, flags); + if (ret == DMA_SUCCESS) return ret; - } + + spin_lock_irqsave(&tdc->lock, flags); /* Check on wait_ack desc status */ list_for_each_entry(dma_desc, &tdc->free_dma_desc, node) { -- 2.39.5