summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-05-27 15:14:39 +0300
committerVinod Koul <vinod.koul@intel.com>2013-08-05 09:32:25 +0530
commit0a0aee203c202e946a1e7dee3d40714dbab951a4 (patch)
treefc76459835ca5d1a849039a1fd037e08f9b9b68b
parentda0a908ed96b3eda788d6dc87b3e0b1610c40ec8 (diff)
downloadlinux-0a0aee203c202e946a1e7dee3d40714dbab951a4.tar.gz
linux-0a0aee203c202e946a1e7dee3d40714dbab951a4.tar.bz2
linux-0a0aee203c202e946a1e7dee3d40714dbab951a4.zip
tegra20-apb-dma: remove useless use of lock
Accordingly to dma_cookie_status() description locking is not required. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: linux-tegra@vger.kernel.org Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/tegra20-apb-dma.c8
1 files 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) {