diff options
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 59e49c80cc2c..bff29c58da23 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -23,13 +23,13 @@ | |||
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/topology.h> | 24 | #include <linux/topology.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | #include <linux/module.h> | ||
27 | 26 | ||
28 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
29 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
30 | #include <asm/irq_regs.h> | 29 | #include <asm/irq_regs.h> |
31 | 30 | ||
32 | struct seq_file; | 31 | struct seq_file; |
32 | struct module; | ||
33 | struct irq_desc; | 33 | struct irq_desc; |
34 | struct irq_data; | 34 | struct irq_data; |
35 | typedef void (*irq_flow_handler_t)(unsigned int irq, | 35 | typedef void (*irq_flow_handler_t)(unsigned int irq, |
@@ -567,29 +567,21 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
567 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | 567 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, |
568 | struct module *owner); | 568 | struct module *owner); |
569 | 569 | ||
570 | static inline int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, | 570 | /* use macros to avoid needing export.h for THIS_MODULE */ |
571 | int node) | 571 | #define irq_alloc_descs(irq, from, cnt, node) \ |
572 | { | 572 | __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE) |
573 | return __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE); | ||
574 | } | ||
575 | 573 | ||
576 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 574 | #define irq_alloc_desc(node) \ |
577 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 575 | irq_alloc_descs(-1, 0, 1, node) |
578 | 576 | ||
579 | static inline int irq_alloc_desc(int node) | 577 | #define irq_alloc_desc_at(at, node) \ |
580 | { | 578 | irq_alloc_descs(at, at, 1, node) |
581 | return irq_alloc_descs(-1, 0, 1, node); | ||
582 | } | ||
583 | 579 | ||
584 | static inline int irq_alloc_desc_at(unsigned int at, int node) | 580 | #define irq_alloc_desc_from(from, node) \ |
585 | { | 581 | irq_alloc_descs(-1, from, 1, node) |
586 | return irq_alloc_descs(at, at, 1, node); | ||
587 | } | ||
588 | 582 | ||
589 | static inline int irq_alloc_desc_from(unsigned int from, int node) | 583 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
590 | { | 584 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
591 | return irq_alloc_descs(-1, from, 1, node); | ||
592 | } | ||
593 | 585 | ||
594 | static inline void irq_free_desc(unsigned int irq) | 586 | static inline void irq_free_desc(unsigned int irq) |
595 | { | 587 | { |