summaryrefslogtreecommitdiff
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-10-16 16:16:11 +0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 18:53:30 +0400
commit811410fdb6b9d82a518542289efe9b2a51e3cbfb (patch)
tree50503e472de487366eb497464be80d453379d977 /include/linux/irq.h
parent249f6d9eab372790579ada8991bba3384c204e06 (diff)
downloadlinux-811410fdb6b9d82a518542289efe9b2a51e3cbfb.tar.xz
genirq: add reverse iterator for irq_desc
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h4
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