* [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel()
@ 2023-11-18 8:42 Christophe JAILLET
2023-11-18 19:29 ` Sergey Shtylyov
2023-11-20 0:31 ` Damien Le Moal
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2023-11-18 8:42 UTC (permalink / raw)
To: Sergey Shtylyov, Damien Le Moal
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-ide
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>
---
v2: Propagate the error code [Sergey Shtylyov]
v1: https://lore.kernel.org/all/f177835b7f0db810a132916c8a281bbdaf47f9d3.1699801657.git.christophe.jaillet@wanadoo.fr/
---
drivers/ata/pata_pxa.c | 7 +++----
1 file 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);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel()
2023-11-18 8:42 [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel() Christophe JAILLET
@ 2023-11-18 19:29 ` Sergey Shtylyov
2023-11-20 0:31 ` Damien Le Moal
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Shtylyov @ 2023-11-18 19:29 UTC (permalink / raw)
To: Christophe JAILLET, Damien Le Moal
Cc: linux-kernel, kernel-janitors, linux-ide
On 11/18/23 11:42 AM, Christophe JAILLET wrote:
> 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>
[...]
MBR, Sergey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel()
2023-11-18 8:42 [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel() Christophe JAILLET
2023-11-18 19:29 ` Sergey Shtylyov
@ 2023-11-20 0:31 ` Damien Le Moal
1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2023-11-20 0:31 UTC (permalink / raw)
To: Christophe JAILLET, Sergey Shtylyov
Cc: linux-kernel, kernel-janitors, linux-ide
On 11/18/23 17:42, Christophe JAILLET wrote:
> 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>
Applied to for-6.8. Thanks !
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-20 0:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-18 8:42 [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel() Christophe JAILLET
2023-11-18 19:29 ` Sergey Shtylyov
2023-11-20 0:31 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).