summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorXu Qiang <xuqiang36@huawei.com>2022-07-19 06:36:40 +0000
committerMarc Zyngier <maz@kernel.org>2022-07-19 14:51:13 +0100
commit6f194c99f466147148cc08452718b46664112548 (patch)
tree07726676a32558dd001a1356715c49200da45723 /kernel/irq
parent295171705c9ac98f4626609033f6bab0c2e37ed0 (diff)
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: d22558dd0a6c (“irqdomain: Introduce irq_resolve_mapping()”) Signed-off-by: Xu Qiang <xuqiang36@huawei.com> [maz: commit message] Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/irqdomain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index d5ce96510549..481abb885d61 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain,
data = irq_domain_get_irq_data(domain, hwirq);
if (data && data->hwirq == hwirq)
desc = irq_data_to_desc(data);
+ if (irq && desc)
+ *irq = hwirq;
}
return desc;