Skip to content

Commit

Permalink
dmaengine: imx-sdma: return sdmac->status in sdma_tx_status()
Browse files Browse the repository at this point in the history
The sdmac->status was designed to reflect the status of the tx,
so simply return it in sdma_tx_status().  Then dma client can call
dma_async_is_tx_complete() to know the status of the tx.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Shawn Guo authored and Sascha Hauer committed Jan 31, 2011
1 parent 4b2ce9d commit 8a96591
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/dma/imx-sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,14 +1061,12 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan,
{
struct sdma_channel *sdmac = to_sdma_chan(chan);
dma_cookie_t last_used;
enum dma_status ret;

last_used = chan->cookie;

ret = dma_async_is_complete(cookie, sdmac->last_completed, last_used);
dma_set_tx_state(txstate, sdmac->last_completed, last_used, 0);

return ret;
return sdmac->status;
}

static void sdma_issue_pending(struct dma_chan *chan)
Expand Down

0 comments on commit 8a96591

Please sign in to comment.