memory: omap-gpmc: 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>
Acked-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20211221203916.18588-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
This commit is contained in:
Lad Prabhakar 2021-12-21 20:39:15 +00:00 committed by Krzysztof Kozlowski
parent fa55b7dcdc
commit 19d398dca5

View File

@ -2510,13 +2510,9 @@ static int gpmc_probe(struct platform_device *pdev)
if (IS_ERR(gpmc_base)) if (IS_ERR(gpmc_base))
return PTR_ERR(gpmc_base); return PTR_ERR(gpmc_base);
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); gpmc->irq = platform_get_irq(pdev, 0);
if (!res) { if (gpmc->irq < 0)
dev_err(&pdev->dev, "Failed to get resource: irq\n"); return gpmc->irq;
return -ENOENT;
}
gpmc->irq = res->start;
gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck"); gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck");
if (IS_ERR(gpmc_l3_clk)) { if (IS_ERR(gpmc_l3_clk)) {