Created
October 12, 2022 12:44
-
-
Save gabriserra/f964dd04cc1e80686ebbe0c762568671 to your computer and use it in GitHub Desktop.
Get HW IRQ number from Linux IRQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static long long irq_to_hwirq(unsigned int irq) | |
{ | |
struct irq_data *irq_data; | |
irq_data = irq_get_irq_data(irq); | |
if (irq_data == NULL) | |
{ | |
pr_err("driver: unable to find irq %u descriptor.\n", irq); | |
return -EINVAL; | |
} | |
return irqd_to_hwirq(irq_data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment