mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 16:07:39 +00:00
gpiolib: Add the support for the msi parent domain
If the gpio's parent irqdomain is a msi irqdomain, we should ignore the EEXIST error returned by the msi irqdomain because all the msi interrupts have already been allocated. Signed-off-by: Kevin Hao <haokexin@gmail.com> Link: https://lore.kernel.org/r/20200114082821.14015-4-haokexin@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
2425876167
commit
880b7cf22e
1 changed files with 6 additions and 0 deletions
|
@ -2050,6 +2050,12 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
|
|||
chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n",
|
||||
irq, parent_hwirq);
|
||||
ret = irq_domain_alloc_irqs_parent(d, irq, 1, parent_arg);
|
||||
/*
|
||||
* If the parent irqdomain is msi, the interrupts have already
|
||||
* been allocated, so the EEXIST is good.
|
||||
*/
|
||||
if (irq_domain_is_msi(d->parent) && (ret == -EEXIST))
|
||||
ret = 0;
|
||||
if (ret)
|
||||
chip_err(gc,
|
||||
"failed to allocate parent hwirq %d for hwirq %lu\n",
|
||||
|
|
Loading…
Reference in a new issue