Skip to content

Commit

Permalink
mmc: tmio_mmc: use dmaengine helpers, drop submit check
Browse files Browse the repository at this point in the history
Use the new dmaengine helper functions, and drop the error check
on the returned cookier from the dmaengine - we recently
established that this is really not allowed to fail.

Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
linusw authored and cjb committed Mar 15, 2011
1 parent 3383433 commit 449bdc2
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions drivers/mmc/host/tmio_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,13 +836,8 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
if (desc) {
desc->callback = tmio_dma_complete;
desc->callback_param = host;
cookie = desc->tx_submit(desc);
if (cookie < 0) {
desc = NULL;
ret = cookie;
} else {
chan->device->device_issue_pending(chan);
}
cookie = dmaengine_submit(desc);
dma_async_issue_pending(chan);
}
dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n",
__func__, host->sg_len, ret, cookie, host->mrq);
Expand Down Expand Up @@ -915,11 +910,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)
if (desc) {
desc->callback = tmio_dma_complete;
desc->callback_param = host;
cookie = desc->tx_submit(desc);
if (cookie < 0) {
desc = NULL;
ret = cookie;
}
cookie = dmaengine_submit(desc);
}
dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n",
__func__, host->sg_len, ret, cookie, host->mrq);
Expand Down Expand Up @@ -963,7 +954,7 @@ static void tmio_issue_tasklet_fn(unsigned long priv)
struct tmio_mmc_host *host = (struct tmio_mmc_host *)priv;
struct dma_chan *chan = host->chan_tx;

chan->device->device_issue_pending(chan);
dma_async_issue_pending(chan);
}

static void tmio_tasklet_fn(unsigned long arg)
Expand Down

0 comments on commit 449bdc2

Please sign in to comment.