aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2015-12-22 22:35:23 -0500
committerVinod Koul <vinod.koul@intel.com>2016-01-06 04:46:36 -0500
commit16605e8d50898ac88b5b504a7fbd63ecdcf37702 (patch)
tree34a705638a21f3958d4c9ac7083993a24c097e78
parent168309855a7d1e16db751e9c647119fe2d2dc878 (diff)
dmaengine: Revert "dmaengine: mic_x100: add missing spin_unlock"
This reverts commit e958e079e254 ("dmaengine: mic_x100: add missing spin_unlock"). The above patch is incorrect. There is nothing wrong with the original code. The spin_lock is acquired in the "prep" functions and released in "submit". Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/mic_x100_dma.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index cddfa8dbf4bd..068e920ecb68 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -317,7 +317,6 @@ mic_dma_prep_memcpy_lock(struct dma_chan *ch, dma_addr_t dma_dest,
317 struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); 317 struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch);
318 struct device *dev = mic_dma_ch_to_device(mic_ch); 318 struct device *dev = mic_dma_ch_to_device(mic_ch);
319 int result; 319 int result;
320 struct dma_async_tx_descriptor *tx = NULL;
321 320
322 if (!len && !flags) 321 if (!len && !flags)
323 return NULL; 322 return NULL;
@@ -325,13 +324,10 @@ mic_dma_prep_memcpy_lock(struct dma_chan *ch, dma_addr_t dma_dest,
325 spin_lock(&mic_ch->prep_lock); 324 spin_lock(&mic_ch->prep_lock);
326 result = mic_dma_do_dma(mic_ch, flags, dma_src, dma_dest, len); 325 result = mic_dma_do_dma(mic_ch, flags, dma_src, dma_dest, len);
327 if (result >= 0) 326 if (result >= 0)
328 tx = allocate_tx(mic_ch); 327 return allocate_tx(mic_ch);
329 328 dev_err(dev, "Error enqueueing dma, error=%d\n", result);
330 if (!tx)
331 dev_err(dev, "Error enqueueing dma, error=%d\n", result);
332
333 spin_unlock(&mic_ch->prep_lock); 329 spin_unlock(&mic_ch->prep_lock);
334 return tx; 330 return NULL;
335} 331}
336 332
337static struct dma_async_tx_descriptor * 333static struct dma_async_tx_descriptor *
@@ -339,14 +335,13 @@ mic_dma_prep_interrupt_lock(struct dma_chan *ch, unsigned long flags)
339{ 335{
340 struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); 336 struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch);
341 int ret; 337 int ret;
342 struct dma_async_tx_descriptor *tx = NULL;
343 338
344 spin_lock(&mic_ch->prep_lock); 339 spin_lock(&mic_ch->prep_lock);
345 ret = mic_dma_do_dma(mic_ch, flags, 0, 0, 0); 340 ret = mic_dma_do_dma(mic_ch, flags, 0, 0, 0);
346 if (!ret) 341 if (!ret)
347 tx = allocate_tx(mic_ch); 342 return allocate_tx(mic_ch);
348 spin_unlock(&mic_ch->prep_lock); 343 spin_unlock(&mic_ch->prep_lock);
349 return tx; 344 return NULL;
350} 345}
351 346
352/* Return the status of the transaction */ 347/* Return the status of the transaction */