diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-30 10:45:07 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 16:39:07 +0200 |
commit | a98d24b71b6e229965f18dc00d28dc71cb8fe324 (patch) | |
tree | 213a6daf67e459b2078e630d5a8163c3b8fd3a9c /kernel/irq/irqdesc.c | |
parent | 13bfe99e09123ef5edb6acb81ba337d2db600b53 (diff) |
genirq: Implement sane enumeration
Use the allocator bitmap to lookup active interrupts.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/irqdesc.c')
-rw-r--r-- | kernel/irq/irqdesc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 6312a2c83971..2e7e94ef64da 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -463,6 +463,17 @@ err: return ret; } +/** + * irq_get_next_irq - get next allocated irq number + * @offset: where to start the search + * + * Returns next irq number after offset or nr_irqs if none is found. + */ +unsigned int irq_get_next_irq(unsigned int offset) +{ + return find_next_bit(allocated_irqs, nr_irqs, offset); +} + /* Statistics access */ void clear_kstat_irqs(struct irq_desc *desc) { |