commit: c7886b18273b07042e25e8d3ba5c983837b84123
From: Magnus Damm <[email protected]>
Date: Wed, 13 Feb 2013 00:56:13 +0900
Subject: gpio: em: Use irq_domain_add_simple() to fix runtime error

Adjust the gpio-em.c driver to reconsider the pdata->irq_base
variable. Non-DT board code like for instance board-kzm9d.c
needs to operate of a static IRQ range for platform devices.

So this patch is updating the code to make use of the function
irq_domain_add_simple() instead of irq_domain_add_linear().

Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
7385500 gpio/em: convert to linear IRQ domain

Cc: [email protected]
Signed-off-by: Magnus Damm <[email protected]>
Tested-by: Simon Horman <[email protected]>
Reported-by: Simon Horman <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
---
 drivers/gpio/gpio-em.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index bdc8302..deca78f 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -299,8 +299,9 @@ static int em_gio_probe(struct platform_device *pdev)
        irq_chip->irq_set_type = em_gio_irq_set_type;
        irq_chip->flags = IRQCHIP_SKIP_SET_WAKE;
 
-       p->irq_domain = irq_domain_add_linear(pdev->dev.of_node,
+       p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
                                              pdata->number_of_pins,
+                                             pdata->irq_base,
                                              &em_gio_irq_domain_ops, p);
        if (!p->irq_domain) {
                ret = -ENXIO;
-- 
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to