aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-05-04 05:22:15 -0400
committerDan Williams <dan.j.williams@intel.com>2010-05-17 04:33:56 -0400
commitcc05ea0cd63437da2033b3ce6e033b1f1aaaf640 (patch)
tree78b2786870053f56d3ba077c628d2cc975a4c737 /drivers/dma/dmaengine.c
parent8d318a50b3d72e3daf94131f91e1ab799a8d5ad4 (diff)
DMA ENGINE: Do not reset 'private' of channel
The member 'private' of 'struct dma_chan' is meant for passing data between client and the controller driver. The DMA client driver may point it to platform specific stuff after acquiring the channel. So, it is the responsiblity of the same code to reset it, if it must. The DMA engine doesn't set it and hence, shouldn't reset it either. This reseting of private by DMA Engine comes in the way of implementing default channel settings during DMAC probe. That capability is useful for not having the clients to always provide platform specific data, like Rx/Tx FIFO addresses, which usually doesn't change across channel requests. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 790caeeb4ccd..21eb896f4dfd 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -514,7 +514,6 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
514 break; 514 break;
515 if (--device->privatecnt == 0) 515 if (--device->privatecnt == 0)
516 dma_cap_clear(DMA_PRIVATE, device->cap_mask); 516 dma_cap_clear(DMA_PRIVATE, device->cap_mask);
517 chan->private = NULL;
518 chan = NULL; 517 chan = NULL;
519 } 518 }
520 } 519 }
@@ -536,7 +535,6 @@ void dma_release_channel(struct dma_chan *chan)
536 /* drop PRIVATE cap enabled by __dma_request_channel() */ 535 /* drop PRIVATE cap enabled by __dma_request_channel() */
537 if (--chan->device->privatecnt == 0) 536 if (--chan->device->privatecnt == 0)
538 dma_cap_clear(DMA_PRIVATE, chan->device->cap_mask); 537 dma_cap_clear(DMA_PRIVATE, chan->device->cap_mask);
539 chan->private = NULL;
540 mutex_unlock(&dma_list_mutex); 538 mutex_unlock(&dma_list_mutex);
541} 539}
542EXPORT_SYMBOL_GPL(dma_release_channel); 540EXPORT_SYMBOL_GPL(dma_release_channel);