/* fsl_dma_is_complete - Determine the DMA status @fsl_chan : Freescale DMA channel  */
static enum dma_status fsl_dma_is_complete(struct dma_chan *chan, dma_cookie_t cookie, dma_cookie_t *done, dma_cookie_t *used)
/* fsl_dma_is_complete - Determine the DMA status @fsl_chan : Freescale DMA channel  */
static enum dma_status fsl_dma_is_complete(struct dma_chan *chan, dma_cookie_t cookie, dma_cookie_t *done, dma_cookie_t *used)
{
	struct fsl_dma_chan *fsl_chan = to_fsl_chan(chan);
	dma_cookie_t last_used;
	dma_cookie_t last_complete;
	fsl_chan_ld_cleanup(fsl_chan);
	last_used = chan->cookie;
	last_complete = fsl_chan->completed_cookie;
	if (done)
		*done = last_complete;
	if (used)
		*used = last_used;
	return dma_async_is_complete(cookie, last_complete, last_used);
}