Commit bb40bb69 authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Vinod Koul

dmaengine: mediatek: mtk-hsdma: 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-3-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 8b0c9937
...@@ -923,13 +923,10 @@ static int mtk_hsdma_probe(struct platform_device *pdev) ...@@ -923,13 +923,10 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
return PTR_ERR(hsdma->clk); return PTR_ERR(hsdma->clk);
} }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); err = platform_get_irq(pdev, 0);
if (!res) { if (err < 0)
dev_err(&pdev->dev, "No irq resource for %s\n", return err;
dev_name(&pdev->dev)); hsdma->irq = err;
return -EINVAL;
}
hsdma->irq = res->start;
refcount_set(&hsdma->pc_refcnt, 0); refcount_set(&hsdma->pc_refcnt, 0);
spin_lock_init(&hsdma->lock); spin_lock_init(&hsdma->lock);
......
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