genirq: add reverse iterator for irq_desc

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner 2008-10-16 14:16:11 +02:00 committed by Ingo Molnar
parent 249f6d9eab
commit 811410fdb6

View File

@ -21,6 +21,10 @@ extern int nr_irqs;
# define for_each_irq_desc(irq, desc) \
for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
# define for_each_irq_desc_reverse(irq, desc) \
for (irq = nr_irqs -1, desc = irq_desc + (nr_irqs -1 ); \
irq > 0; irq--, desc--)
#endif
#ifndef CONFIG_S390