diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-11-18 09:42:07 +0100 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-11-20 01:28:25 +0100 |
commit | 804901fdd637c7af8b767c329fd84aa0d3d617ec (patch) | |
tree | dbe3056211a29c47216a2603df0c6ad6312a99a4 /drivers/ata | |
parent | Linux 6.7-rc2 (diff) | |
download | linux-804901fdd637c7af8b767c329fd84aa0d3d617ec.tar.xz linux-804901fdd637c7af8b767c329fd84aa0d3d617ec.zip |
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_pxa.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c index 5275c6464f57..538bd3423d85 100644 --- a/drivers/ata/pata_pxa.c +++ b/drivers/ata/pata_pxa.c @@ -274,10 +274,9 @@ static int pxa_ata_probe(struct platform_device *pdev) /* * Request the DMA channel */ - data->dma_chan = - dma_request_slave_channel(&pdev->dev, "data"); - if (!data->dma_chan) - return -EBUSY; + data->dma_chan = dma_request_chan(&pdev->dev, "data"); + if (IS_ERR(data->dma_chan)) + return PTR_ERR(data->dma_chan); ret = dmaengine_slave_config(data->dma_chan, &config); if (ret < 0) { dev_err(&pdev->dev, "dma configuration failed: %d\n", ret); |