aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2013-10-16 03:59:02 -0400
committerVinod Koul <vinod.koul@intel.com>2013-10-25 01:45:38 -0400
commitadfedd9a32e4e3490c0060576fd824881572b72a (patch)
tree83c422afd052ce038ed32d766e11ddbc690a0209 /include
parente98b3cafe5f048be40ff6acb18dfa7c9a0e9423e (diff)
dmaengine: use DMA_COMPLETE for dma completion status
the DMA_SUCCESS is a misnomer as dmaengine indicates the transfer is complete and gives no guarantee of the transfer success. Hence we should use DMA_COMPLTE instead of DMA_SUCCESS Acked-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmaengine.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 0bc727534108..120e64c96478 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -45,13 +45,13 @@ static inline int dma_submit_error(dma_cookie_t cookie)
45 45
46/** 46/**
47 * enum dma_status - DMA transaction status 47 * enum dma_status - DMA transaction status
48 * @DMA_SUCCESS: transaction completed successfully 48 * @DMA_COMPLETE: transaction completed
49 * @DMA_IN_PROGRESS: transaction not yet processed 49 * @DMA_IN_PROGRESS: transaction not yet processed
50 * @DMA_PAUSED: transaction is paused 50 * @DMA_PAUSED: transaction is paused
51 * @DMA_ERROR: transaction failed 51 * @DMA_ERROR: transaction failed
52 */ 52 */
53enum dma_status { 53enum dma_status {
54 DMA_SUCCESS, 54 DMA_SUCCESS = 0, DMA_COMPLETE = 0,
55 DMA_IN_PROGRESS, 55 DMA_IN_PROGRESS,
56 DMA_PAUSED, 56 DMA_PAUSED,
57 DMA_ERROR, 57 DMA_ERROR,
@@ -979,10 +979,10 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
979{ 979{
980 if (last_complete <= last_used) { 980 if (last_complete <= last_used) {
981 if ((cookie <= last_complete) || (cookie > last_used)) 981 if ((cookie <= last_complete) || (cookie > last_used))
982 return DMA_SUCCESS; 982 return DMA_COMPLETE;
983 } else { 983 } else {
984 if ((cookie <= last_complete) && (cookie > last_used)) 984 if ((cookie <= last_complete) && (cookie > last_used))
985 return DMA_SUCCESS; 985 return DMA_COMPLETE;
986 } 986 }
987 return DMA_IN_PROGRESS; 987 return DMA_IN_PROGRESS;
988} 988}
@@ -1013,11 +1013,11 @@ static inline struct dma_chan *dma_find_channel(enum dma_transaction_type tx_typ
1013} 1013}
1014static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie) 1014static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
1015{ 1015{
1016 return DMA_SUCCESS; 1016 return DMA_COMPLETE;
1017} 1017}
1018static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) 1018static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
1019{ 1019{
1020 return DMA_SUCCESS; 1020 return DMA_COMPLETE;
1021} 1021}
1022static inline void dma_issue_pending_all(void) 1022static inline void dma_issue_pending_all(void)
1023{ 1023{