Skip to content

Commit

Permalink
ARM: PXA: Kill use of irq_create_strict_mappings()
Browse files Browse the repository at this point in the history
irq_create_strict_mappings() is a poor way to allow the use of
a linear IRQ domain as a legacy one. Let's be upfront about
it and use a legacy domain when appropriate.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210406093557.1073423-3-maz@kernel.org
  • Loading branch information
Marc Zyngier committed Apr 22, 2021
1 parent 46135d6 commit b68761d
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions arch/arm/mach-pxa/pxa_cplds_irqs.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,20 @@ static int cplds_probe(struct platform_device *pdev)
}

irq_set_irq_wake(fpga->irq, 1);
fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node,
CPLDS_NB_IRQ,
&cplds_irq_domain_ops, fpga);
if (base_irq)
fpga->irqdomain = irq_domain_add_legacy(pdev->dev.of_node,
CPLDS_NB_IRQ,
base_irq, 0,
&cplds_irq_domain_ops,
fpga);
else
fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node,
CPLDS_NB_IRQ,
&cplds_irq_domain_ops,
fpga);
if (!fpga->irqdomain)
return -ENODEV;

if (base_irq) {
ret = irq_create_strict_mappings(fpga->irqdomain, base_irq, 0,
CPLDS_NB_IRQ);
if (ret) {
dev_err(&pdev->dev, "couldn't create the irq mapping %d..%d\n",
base_irq, base_irq + CPLDS_NB_IRQ);
return ret;
}
}

return 0;
}

Expand Down

0 comments on commit b68761d

Please sign in to comment.