diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-10-16 14:16:11 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 16:53:30 +0200 |
commit | 811410fdb6b9d82a518542289efe9b2a51e3cbfb (patch) | |
tree | 50503e472de487366eb497464be80d453379d977 /include/linux | |
parent | 249f6d9eab372790579ada8991bba3384c204e06 (diff) | |
download | linux-811410fdb6b9d82a518542289efe9b2a51e3cbfb.tar.gz linux-811410fdb6b9d82a518542289efe9b2a51e3cbfb.tar.bz2 linux-811410fdb6b9d82a518542289efe9b2a51e3cbfb.zip |
genirq: add reverse iterator for irq_desc
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/irq.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 38bf89f2ade0..31632aa65d16 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -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 |