Commit a5ece7d2 authored by Linus Walleij's avatar Linus Walleij Committed by Chris Ball

mmc: sh_mmcif: use dmaengine helpers, drop submit check

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent f38f94c6
...@@ -224,14 +224,9 @@ static void sh_mmcif_start_dma_rx(struct sh_mmcif_host *host) ...@@ -224,14 +224,9 @@ static void sh_mmcif_start_dma_rx(struct sh_mmcif_host *host)
if (desc) { if (desc) {
desc->callback = mmcif_dma_complete; desc->callback = mmcif_dma_complete;
desc->callback_param = host; desc->callback_param = host;
cookie = desc->tx_submit(desc); cookie = dmaengine_submit(desc);
if (cookie < 0) {
desc = NULL;
ret = cookie;
} else {
sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAREN); sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAREN);
chan->device->device_issue_pending(chan); dma_async_issue_pending(chan);
}
} }
dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n", dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n",
__func__, host->data->sg_len, ret, cookie); __func__, host->data->sg_len, ret, cookie);
...@@ -277,14 +272,9 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host) ...@@ -277,14 +272,9 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host)
if (desc) { if (desc) {
desc->callback = mmcif_dma_complete; desc->callback = mmcif_dma_complete;
desc->callback_param = host; desc->callback_param = host;
cookie = desc->tx_submit(desc); cookie = dmaengine_submit(desc);
if (cookie < 0) {
desc = NULL;
ret = cookie;
} else {
sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAWEN); sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAWEN);
chan->device->device_issue_pending(chan); dma_async_issue_pending(chan);
}
} }
dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n", dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n",
__func__, host->data->sg_len, ret, cookie); __func__, host->data->sg_len, ret, cookie);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment