mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
dmaengine: vchan: add vchan_chan_name() to get channel device name
Introduce vchan_chan_name() to obtain the DMA channel device name. Use a dedicated helper instead of directly accessing dma_chan::dev so callers remain unaffected by an upcoming rename of the struct member. Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com> # For STM32 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260909-dma-chan_dev-rename-v4-1-d8fb6892a70f@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
ff4dc66e80
commit
75d8640d7f
|
|
@ -512,7 +512,7 @@ static int d350_alloc_chan_resources(struct dma_chan *chan)
|
|||
{
|
||||
struct d350_chan *dch = to_d350_chan(chan);
|
||||
int ret = request_irq(dch->irq, d350_irq, IRQF_SHARED,
|
||||
dev_name(&dch->vc.chan.dev->device), dch);
|
||||
vchan_chan_name(&dch->vc), dch);
|
||||
if (!ret)
|
||||
writel_relaxed(CH_INTREN_DONE | CH_INTREN_ERR, dch->base + CH_INTREN);
|
||||
|
||||
|
|
|
|||
|
|
@ -678,7 +678,7 @@ static int loongson2_cmc_dma_probe(struct platform_device *pdev)
|
|||
return lchan->irq;
|
||||
|
||||
ret = devm_request_irq(dev, lchan->irq, loongson2_cmc_dma_chan_irq, IRQF_SHARED,
|
||||
dev_name(chan2dev(lchan)), lchan);
|
||||
vchan_chan_name(&lchan->vchan), lchan);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1668,7 +1668,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
|
|||
|
||||
ret = devm_request_irq(&pdev->dev, chan->irq,
|
||||
stm32_dma_chan_irq, 0,
|
||||
dev_name(chan2dev(chan)), chan);
|
||||
vchan_chan_name(&chan->vchan), chan);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
"request_irq failed with err %d channel %d\n",
|
||||
|
|
|
|||
|
|
@ -1892,10 +1892,10 @@ static int stm32_dma3_probe(struct platform_device *pdev)
|
|||
chan->irq = ret;
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, chan->irq, stm32_dma3_chan_irq, 0,
|
||||
dev_name(chan2dev(chan)), chan);
|
||||
vchan_chan_name(&chan->vchan), chan);
|
||||
if (ret) {
|
||||
dev_err_probe(&pdev->dev, ret, "Failed to request channel %s IRQ\n",
|
||||
dev_name(chan2dev(chan)));
|
||||
vchan_chan_name(&chan->vchan));
|
||||
goto err_clk_disable;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,6 +209,17 @@ static inline void vchan_free_chan_resources(struct virt_dma_chan *vc)
|
|||
vchan_dma_desc_free_list(vc, &head);
|
||||
}
|
||||
|
||||
/**
|
||||
* vchan_chan_name - Return vchan DMA channel device name
|
||||
* @vc: virtual channel
|
||||
*
|
||||
* Return: The name of the DMA channel device
|
||||
*/
|
||||
static inline const char *vchan_chan_name(struct virt_dma_chan *vc)
|
||||
{
|
||||
return dma_chan_name(&vc->chan);
|
||||
}
|
||||
|
||||
/**
|
||||
* vchan_synchronize() - synchronize callback execution to the current context
|
||||
* @vc: virtual channel to synchronize
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user