Skip to content

Commit

Permalink
irq: Add irq_node() primitive
Browse files Browse the repository at this point in the history
... to return irq_desc node info without #ifdefs at the callsites.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
LKML-Reference: <4A95C350.8060308@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Aug 29, 2009
1 parent 372e24b commit 5bfb5b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/linux/irqnr.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ extern struct irq_desc *irq_to_desc(unsigned int irq);
; \
else

#ifdef CONFIG_SMP
#define irq_node(irq) (irq_to_desc(irq)->node)
#else
#define irq_node(irq) 0
#endif

#endif /* CONFIG_GENERIC_HARDIRQS */

#define for_each_irq_nr(irq) \
Expand Down

0 comments on commit 5bfb5b5

Please sign in to comment.