Commit 79919010 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Jens Axboe

ata: pata_arasan_cf: Use dma_request_chan() instead dma_request_slave_channel()

dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.

The dma_request_chan() is the standard API to request slave channel,
clients should be moved away from the legacy API to allow us to retire
them.
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 10a663a1
...@@ -526,9 +526,10 @@ static void data_xfer(struct work_struct *work) ...@@ -526,9 +526,10 @@ static void data_xfer(struct work_struct *work)
/* request dma channels */ /* request dma channels */
/* dma_request_channel may sleep, so calling from process context */ /* dma_request_channel may sleep, so calling from process context */
acdev->dma_chan = dma_request_slave_channel(acdev->host->dev, "data"); acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
if (!acdev->dma_chan) { if (IS_ERR(acdev->dma_chan)) {
dev_err(acdev->host->dev, "Unable to get dma_chan\n"); dev_err(acdev->host->dev, "Unable to get dma_chan\n");
acdev->dma_chan = NULL;
goto chan_request_fail; goto chan_request_fail;
} }
...@@ -539,6 +540,7 @@ static void data_xfer(struct work_struct *work) ...@@ -539,6 +540,7 @@ static void data_xfer(struct work_struct *work)
} }
dma_release_channel(acdev->dma_chan); dma_release_channel(acdev->dma_chan);
acdev->dma_chan = NULL;
/* data xferred successfully */ /* data xferred successfully */
if (!ret) { if (!ret) {
......
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