提交 6f194c99 编写于 作者: X Xu Qiang 提交者: Marc Zyngier

irqdomain: Report irq number for NOMAP domains

When using a NOMAP domain, __irq_resolve_mapping() doesn't store
the Linux IRQ number at the address optionally provided by the caller.
While this isn't a huge deal (the returned value is guaranteed
to the hwirq that was passed as a parameter), let's honour the letter
of the API by writing the expected value.

Fixes: d22558dd (“irqdomain: Introduce irq_resolve_mapping()”)
Signed-off-by: NXu Qiang <xuqiang36@huawei.com>
[maz: commit message]
Signed-off-by: NMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com
上级 29517170
...@@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain, ...@@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain,
data = irq_domain_get_irq_data(domain, hwirq); data = irq_domain_get_irq_data(domain, hwirq);
if (data && data->hwirq == hwirq) if (data && data->hwirq == hwirq)
desc = irq_data_to_desc(data); desc = irq_data_to_desc(data);
if (irq && desc)
*irq = hwirq;
} }
return desc; return desc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册