diff options
author | Magnus Damm <damm@opensource.se> | 2013-02-12 10:56:13 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-02-14 11:44:37 -0500 |
commit | c7886b18273b07042e25e8d3ba5c983837b84123 (patch) | |
tree | a8e64b71711b7a87f857b998329f6f343c8e2de2 | |
parent | e9a65bb63e5fe45b9d0ecd1983749786858da14d (diff) |
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: stable@kernel.org
Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Reported-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-em.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index bdc8302e711a..deca78f99316 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) | |||
299 | irq_chip->irq_set_type = em_gio_irq_set_type; | 299 | irq_chip->irq_set_type = em_gio_irq_set_type; |
300 | irq_chip->flags = IRQCHIP_SKIP_SET_WAKE; | 300 | irq_chip->flags = IRQCHIP_SKIP_SET_WAKE; |
301 | 301 | ||
302 | p->irq_domain = irq_domain_add_linear(pdev->dev.of_node, | 302 | p->irq_domain = irq_domain_add_simple(pdev->dev.of_node, |
303 | pdata->number_of_pins, | 303 | pdata->number_of_pins, |
304 | pdata->irq_base, | ||
304 | &em_gio_irq_domain_ops, p); | 305 | &em_gio_irq_domain_ops, p); |
305 | if (!p->irq_domain) { | 306 | if (!p->irq_domain) { |
306 | ret = -ENXIO; | 307 | ret = -ENXIO; |