Skip to content

Commit 804901f

Browse files
tititiou36damien-lemoal
authored andcommitted
ata: pata_pxa: convert not to use dma_request_slave_channel()
dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. While at it, also propagate the error code that is now available. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent 98b1cc8 commit 804901f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/ata/pata_pxa.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,9 @@ static int pxa_ata_probe(struct platform_device *pdev)
274274
/*
275275
* Request the DMA channel
276276
*/
277-
data->dma_chan =
278-
dma_request_slave_channel(&pdev->dev, "data");
279-
if (!data->dma_chan)
280-
return -EBUSY;
277+
data->dma_chan = dma_request_chan(&pdev->dev, "data");
278+
if (IS_ERR(data->dma_chan))
279+
return PTR_ERR(data->dma_chan);
281280
ret = dmaengine_slave_config(data->dma_chan, &config);
282281
if (ret < 0) {
283282
dev_err(&pdev->dev, "dma configuration failed: %d\n", ret);

0 commit comments

Comments
 (0)