aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mxs-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/mxs-dma.c')
-rw-r--r--drivers/dma/mxs-dma.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index daa84ee2a187..4d3b6ff3050f 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -194,19 +194,6 @@ static void mxs_dma_resume_chan(struct mxs_dma_chan *mxs_chan)
194 mxs_chan->status = DMA_IN_PROGRESS; 194 mxs_chan->status = DMA_IN_PROGRESS;
195} 195}
196 196
197static dma_cookie_t mxs_dma_assign_cookie(struct mxs_dma_chan *mxs_chan)
198{
199 dma_cookie_t cookie = mxs_chan->chan.cookie;
200
201 if (++cookie < 0)
202 cookie = 1;
203
204 mxs_chan->chan.cookie = cookie;
205 mxs_chan->desc.cookie = cookie;
206
207 return cookie;
208}
209
210static struct mxs_dma_chan *to_mxs_dma_chan(struct dma_chan *chan) 197static struct mxs_dma_chan *to_mxs_dma_chan(struct dma_chan *chan)
211{ 198{
212 return container_of(chan, struct mxs_dma_chan, chan); 199 return container_of(chan, struct mxs_dma_chan, chan);
@@ -218,7 +205,7 @@ static dma_cookie_t mxs_dma_tx_submit(struct dma_async_tx_descriptor *tx)
218 205
219 mxs_dma_enable_chan(mxs_chan); 206 mxs_dma_enable_chan(mxs_chan);
220 207
221 return mxs_dma_assign_cookie(mxs_chan); 208 return dma_cookie_assign(tx);
222} 209}
223 210
224static void mxs_dma_tasklet(unsigned long data) 211static void mxs_dma_tasklet(unsigned long data)