aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mediatek
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2022-04-04 16:55:56 +0100
committerVinod Koul <vkoul@kernel.org>2022-04-11 16:26:53 +0530
commitbb40bb695ec8b90bee4bfd7db52ba92c4a0b7586 (patch)
tree253fd73fa2f225f31aacfba34cb24be7c33c8baf /drivers/dma/mediatek
parentdmaengine: nbpfaxi: Use platform_get_irq_optional() to get the interrupt (diff)
downloadlinux-dev-bb40bb695ec8b90bee4bfd7db52ba92c4a0b7586.tar.xz
linux-dev-bb40bb695ec8b90bee4bfd7db52ba92c4a0b7586.zip
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: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220404155557.27316-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/mediatek')
-rw-r--r--drivers/dma/mediatek/mtk-hsdma.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
index 6ad8afbb95f2..c0fffde7fe08 100644
--- a/drivers/dma/mediatek/mtk-hsdma.c
+++ b/drivers/dma/mediatek/mtk-hsdma.c
@@ -923,13 +923,10 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
return PTR_ERR(hsdma->clk);
}
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "No irq resource for %s\n",
- dev_name(&pdev->dev));
- return -EINVAL;
- }
- hsdma->irq = res->start;
+ err = platform_get_irq(pdev, 0);
+ if (err < 0)
+ return err;
+ hsdma->irq = err;
refcount_set(&hsdma->pc_refcnt, 0);
spin_lock_init(&hsdma->lock);