aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-10-18 12:18:44 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-11-05 03:55:33 -0500
commitf1d11f394f6e3fc0368e72244fb5ddc4142e804b (patch)
tree8c6a33623c76afa4450ae20ee9cd1ba5df491c45 /drivers/mfd
parent694e33a7f42de7dcc8b43c3990c597b19ef9b438 (diff)
mfd/ab8500-core: use irq_domain_add_simple()
To be able to use SPARSE_IRQ while yet not using device tree, we need to use irq_domain_add_simple() that will allocate descriptors for the IRQs in the non-DT case, and fall back to using the linear irqdomain in the DT case. Cc: Lee Jones <lee.jones@linaro.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ab8500-core.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 1667c77b5cde..547fff4901ea 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -565,15 +565,10 @@ static int ab8500_irq_init(struct ab8500 *ab8500, struct device_node *np)
565 else 565 else
566 num_irqs = AB8500_NR_IRQS; 566 num_irqs = AB8500_NR_IRQS;
567 567
568 if (ab8500->irq_base) { 568 /* If ->irq_base is zero this will give a linear mapping */
569 ab8500->domain = irq_domain_add_legacy( 569 ab8500->domain = irq_domain_add_simple(NULL,
570 NULL, num_irqs, ab8500->irq_base, 570 num_irqs, ab8500->irq_base,
571 0, &ab8500_irq_ops, ab8500); 571 &ab8500_irq_ops, ab8500);
572 }
573 else {
574 ab8500->domain = irq_domain_add_linear(
575 np, num_irqs, &ab8500_irq_ops, ab8500);
576 }
577 572
578 if (!ab8500->domain) { 573 if (!ab8500->domain) {
579 dev_err(ab8500->dev, "Failed to create irqdomain\n"); 574 dev_err(ab8500->dev, "Failed to create irqdomain\n");