Skip to content

Commit 31d4314

Browse files
andy-shevvinodkoul
authored andcommitted
dmaengine: Replace dma_request_slave_channel() by dma_request_chan()
Replace dma_request_slave_channel() by dma_request_chan() as suggested since the former is deprecated. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250205145757.889247-2-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 2014c95 commit 31d4314

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/dma/imx-sdma.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,9 +1459,8 @@ static int sdma_alloc_chan_resources(struct dma_chan *chan)
14591459
* dmatest, thus create 'struct imx_dma_data mem_data' for this case.
14601460
* Please note in any other slave case, you have to setup chan->private
14611461
* with 'struct imx_dma_data' in your own filter function if you want to
1462-
* request dma channel by dma_request_channel() rather than
1463-
* dma_request_slave_channel(). Othwise, 'MEMCPY in case?' will appear
1464-
* to warn you to correct your filter function.
1462+
* request DMA channel by dma_request_channel(), otherwise, 'MEMCPY in
1463+
* case?' will appear to warn you to correct your filter function.
14651464
*/
14661465
if (!data) {
14671466
dev_dbg(sdmac->sdma->dev, "MEMCPY in case?\n");

include/linux/dmaengine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,8 +1639,8 @@ static inline struct dma_chan
16391639
{
16401640
struct dma_chan *chan;
16411641

1642-
chan = dma_request_slave_channel(dev, name);
1643-
if (chan)
1642+
chan = dma_request_chan(dev, name);
1643+
if (!IS_ERR(chan))
16441644
return chan;
16451645

16461646
if (!fn || !fn_param)

0 commit comments

Comments
 (0)