summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxs/dmaengine.c
diff options
context:
space:
mode:
authorIan Wisbon <ian.wisbon@timesys.com>2011-02-10 17:15:15 -0500
committerIan Wisbon <ian.wisbon@timesys.com>2011-02-10 17:15:15 -0500
commita9d2ba1444b0af6c2d8534f0b306660ffc045bc6 (patch)
tree79b396bf70ae3795e6ee9a3b645e64f7e29474e7 /arch/arm/plat-mxs/dmaengine.c
parenteffff5718c380983788fe6c380671c18e15ac7c2 (diff)
Linux 2.6.31 Release for Digi ConnectCore Wi-i.MX boards2.6.31-digi-201102101717
Diffstat (limited to 'arch/arm/plat-mxs/dmaengine.c')
-rw-r--r--arch/arm/plat-mxs/dmaengine.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/plat-mxs/dmaengine.c b/arch/arm/plat-mxs/dmaengine.c
index 453346e4057f..0c2485b18506 100644
--- a/arch/arm/plat-mxs/dmaengine.c
+++ b/arch/arm/plat-mxs/dmaengine.c
@@ -127,14 +127,16 @@ int mxs_dma_enable(int channel)
if (!(pchan->flags & MXS_DMA_FLAGS_ALLOCATED))
return -EINVAL;
+ /*
+ * neednot mutex lock, this function will be called in irq context.
+ * The mutex may cause process schedule.
+ */
pdma = pchan->dma;
- mutex_lock(&mxs_dma_mutex);
spin_lock_irqsave(&pchan->lock, flags);
if (pchan->pending_num && pdma->enable)
ret = pdma->enable(pchan, channel - pdma->chan_base);
pchan->flags |= MXS_DMA_FLAGS_BUSY;
spin_unlock_irqrestore(&pchan->lock, flags);
- mutex_unlock(&mxs_dma_mutex);
return ret;
}
EXPORT_SYMBOL(mxs_dma_enable);
@@ -151,17 +153,19 @@ void mxs_dma_disable(int channel)
return;
if (!(pchan->flags & MXS_DMA_FLAGS_BUSY))
return;
+ /*
+ * neednot mutex lock, this function will be called in irq context.
+ * The mutex may cause process schedule.
+ */
pdma = pchan->dma;
- mutex_lock(&mxs_dma_mutex);
spin_lock_irqsave(&pchan->lock, flags);
if (pdma->disable)
pdma->disable(pchan, channel - pdma->chan_base);
pchan->flags &= ~MXS_DMA_FLAGS_BUSY;
pchan->active_num = 0;
pchan->pending_num = 0;
- list_splice(&pchan->active, &pchan->done);
+ list_splice_init(&pchan->active, &pchan->done);
spin_unlock_irqrestore(&pchan->lock, flags);
- mutex_unlock(&mxs_dma_mutex);
}
EXPORT_SYMBOL(mxs_dma_disable);