Commit 80380f89 authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Vinod Koul

dmaengine: mediatek-cqdma: Use platform_get_irq() to get the interrupt

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220404155557.27316-4-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent bb40bb69
...@@ -751,7 +751,6 @@ static int mtk_cqdma_probe(struct platform_device *pdev) ...@@ -751,7 +751,6 @@ static int mtk_cqdma_probe(struct platform_device *pdev)
struct mtk_cqdma_device *cqdma; struct mtk_cqdma_device *cqdma;
struct mtk_cqdma_vchan *vc; struct mtk_cqdma_vchan *vc;
struct dma_device *dd; struct dma_device *dd;
struct resource *res;
int err; int err;
u32 i; u32 i;
...@@ -824,13 +823,10 @@ static int mtk_cqdma_probe(struct platform_device *pdev) ...@@ -824,13 +823,10 @@ static int mtk_cqdma_probe(struct platform_device *pdev)
return PTR_ERR(cqdma->pc[i]->base); return PTR_ERR(cqdma->pc[i]->base);
/* allocate IRQ resource */ /* allocate IRQ resource */
res = platform_get_resource(pdev, IORESOURCE_IRQ, i); err = platform_get_irq(pdev, i);
if (!res) { if (err < 0)
dev_err(&pdev->dev, "No irq resource for %s\n", return err;
dev_name(&pdev->dev)); cqdma->pc[i]->irq = err;
return -EINVAL;
}
cqdma->pc[i]->irq = res->start;
err = devm_request_irq(&pdev->dev, cqdma->pc[i]->irq, err = devm_request_irq(&pdev->dev, cqdma->pc[i]->irq,
mtk_cqdma_irq, 0, dev_name(&pdev->dev), mtk_cqdma_irq, 0, dev_name(&pdev->dev),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment