Skip to content

Commit 7991901

Browse files
Peter Ujfalusiaxboe
authored andcommitted
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: Viresh Kumar <[email protected]> Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 10a663a commit 7991901

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/ata/pata_arasan_cf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,10 @@ static void data_xfer(struct work_struct *work)
526526

527527
/* request dma channels */
528528
/* dma_request_channel may sleep, so calling from process context */
529-
acdev->dma_chan = dma_request_slave_channel(acdev->host->dev, "data");
530-
if (!acdev->dma_chan) {
529+
acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
530+
if (IS_ERR(acdev->dma_chan)) {
531531
dev_err(acdev->host->dev, "Unable to get dma_chan\n");
532+
acdev->dma_chan = NULL;
532533
goto chan_request_fail;
533534
}
534535

@@ -539,6 +540,7 @@ static void data_xfer(struct work_struct *work)
539540
}
540541

541542
dma_release_channel(acdev->dma_chan);
543+
acdev->dma_chan = NULL;
542544

543545
/* data xferred successfully */
544546
if (!ret) {

0 commit comments

Comments
 (0)