]> git.itanic.dy.fi Git - linux-stable/commitdiff
ata: pata_pxa: convert not to use dma_request_slave_channel()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 18 Nov 2023 08:42:07 +0000 (09:42 +0100)
committerDamien Le Moal <dlemoal@kernel.org>
Mon, 20 Nov 2023 00:28:25 +0000 (09:28 +0900)
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>
drivers/ata/pata_pxa.c

index 5275c6464f57fcec2710620e68198c64df519377..538bd3423d859d91863f83f7a2beb87b68ae6888 100644 (file)
@@ -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);