Skip to content

Commit b68761d

Browse files
author
Marc Zyngier
committed
ARM: PXA: Kill use of irq_create_strict_mappings()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 46135d6 commit b68761d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

arch/arm/mach-pxa/pxa_cplds_irqs.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,20 @@ static int cplds_probe(struct platform_device *pdev)
147147
}
148148

149149
irq_set_irq_wake(fpga->irq, 1);
150-
fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node,
151-
CPLDS_NB_IRQ,
152-
&cplds_irq_domain_ops, fpga);
150+
if (base_irq)
151+
fpga->irqdomain = irq_domain_add_legacy(pdev->dev.of_node,
152+
CPLDS_NB_IRQ,
153+
base_irq, 0,
154+
&cplds_irq_domain_ops,
155+
fpga);
156+
else
157+
fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node,
158+
CPLDS_NB_IRQ,
159+
&cplds_irq_domain_ops,
160+
fpga);
153161
if (!fpga->irqdomain)
154162
return -ENODEV;
155163

156-
if (base_irq) {
157-
ret = irq_create_strict_mappings(fpga->irqdomain, base_irq, 0,
158-
CPLDS_NB_IRQ);
159-
if (ret) {
160-
dev_err(&pdev->dev, "couldn't create the irq mapping %d..%d\n",
161-
base_irq, base_irq + CPLDS_NB_IRQ);
162-
return ret;
163-
}
164-
}
165-
166164
return 0;
167165
}
168166

0 commit comments

Comments
 (0)