summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFancy Fang <B47543@freescale.com>2013-12-16 13:34:25 +0800
committerFancy Fang <B47543@freescale.com>2013-12-17 18:18:04 +0800
commit15155c753159717fe704110012fb47a68cd359bb (patch)
tree98cec9f95c656ffe0d5b3aab959005135584ac6f /drivers
parent08b7bdabbd6fe9fac04b7f61b8c8403bfe71380b (diff)
ENGR00292129 PXP: remove some unnecessary code from PXP dma driver
There is no need to use spin lock in pxp_prep_slave_sg() after dynamic descriptors allocation enabled. Signed-off-by: Fancy Fang <B47543@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/pxp/pxp_dma_v2.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c
index 18d8279425da..90e1faad3674 100644
--- a/drivers/dma/pxp/pxp_dma_v2.c
+++ b/drivers/dma/pxp/pxp_dma_v2.c
@@ -1295,7 +1295,6 @@ static struct dma_async_tx_descriptor *pxp_prep_slave_sg(struct dma_chan *chan,
struct pxp_tx_desc *desc = NULL;
struct pxp_tx_desc *first = NULL, *prev = NULL;
struct scatterlist *sg;
- unsigned long flags;
dma_addr_t phys_addr;
int i;
@@ -1308,11 +1307,9 @@ static struct dma_async_tx_descriptor *pxp_prep_slave_sg(struct dma_chan *chan,
if (unlikely(sg_len < 2))
return NULL;
- spin_lock_irqsave(&pxp_chan->lock, flags);
for_each_sg(sgl, sg, sg_len, i) {
desc = pxpdma_desc_alloc(pxp_chan);
if (!desc) {
- spin_unlock_irqrestore(&pxp_chan->lock, flags);
dev_err(chan->device->dev, "no enough memory to allocate tx descriptor\n");
return NULL;
}
@@ -1336,7 +1333,6 @@ static struct dma_async_tx_descriptor *pxp_prep_slave_sg(struct dma_chan *chan,
prev = desc;
}
- spin_unlock_irqrestore(&pxp_chan->lock, flags);
pxp->pxp_conf_state.layer_nr = sg_len;
first->txd.flags = tx_flags;