diff options
-rw-r--r-- | drivers/dma/dmaengine.c | 2 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 9162ac80c18f..81d876528c70 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -1062,7 +1062,7 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | |||
1062 | unsigned long dma_sync_wait_timeout = jiffies + msecs_to_jiffies(5000); | 1062 | unsigned long dma_sync_wait_timeout = jiffies + msecs_to_jiffies(5000); |
1063 | 1063 | ||
1064 | if (!tx) | 1064 | if (!tx) |
1065 | return DMA_SUCCESS; | 1065 | return DMA_COMPLETE; |
1066 | 1066 | ||
1067 | while (tx->cookie == -EBUSY) { | 1067 | while (tx->cookie == -EBUSY) { |
1068 | if (time_after_eq(jiffies, dma_sync_wait_timeout)) { | 1068 | if (time_after_eq(jiffies, dma_sync_wait_timeout)) { |
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 | */ |
53 | enum dma_status { | 53 | enum 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 | } |
1014 | static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie) | 1014 | static 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 | } |
1018 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | 1018 | static 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 | } |
1022 | static inline void dma_issue_pending_all(void) | 1022 | static inline void dma_issue_pending_all(void) |
1023 | { | 1023 | { |