|
23 | 23 | #include <linux/errno.h>
|
24 | 24 | #include <linux/topology.h>
|
25 | 25 | #include <linux/wait.h>
|
26 |
| -#include <linux/module.h> |
27 | 26 |
|
28 | 27 | #include <asm/irq.h>
|
29 | 28 | #include <asm/ptrace.h>
|
30 | 29 | #include <asm/irq_regs.h>
|
31 | 30 |
|
32 | 31 | struct seq_file;
|
| 32 | +struct module; |
33 | 33 | struct irq_desc;
|
34 | 34 | struct irq_data;
|
35 | 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 | 567 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
|
568 | 568 | struct module *owner);
|
569 | 569 |
|
570 |
| -static inline int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, |
571 |
| - int node) |
572 |
| -{ |
573 |
| - return __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE); |
574 |
| -} |
| 570 | +/* use macros to avoid needing export.h for THIS_MODULE */ |
| 571 | +#define irq_alloc_descs(irq, from, cnt, node) \ |
| 572 | + __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE) |
575 | 573 |
|
576 |
| -void irq_free_descs(unsigned int irq, unsigned int cnt); |
577 |
| -int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
| 574 | +#define irq_alloc_desc(node) \ |
| 575 | + irq_alloc_descs(-1, 0, 1, node) |
578 | 576 |
|
579 |
| -static inline int irq_alloc_desc(int node) |
580 |
| -{ |
581 |
| - return irq_alloc_descs(-1, 0, 1, node); |
582 |
| -} |
| 577 | +#define irq_alloc_desc_at(at, node) \ |
| 578 | + irq_alloc_descs(at, at, 1, node) |
583 | 579 |
|
584 |
| -static inline int irq_alloc_desc_at(unsigned int at, int node) |
585 |
| -{ |
586 |
| - return irq_alloc_descs(at, at, 1, node); |
587 |
| -} |
| 580 | +#define irq_alloc_desc_from(from, node) \ |
| 581 | + irq_alloc_descs(-1, from, 1, node) |
588 | 582 |
|
589 |
| -static inline int irq_alloc_desc_from(unsigned int from, int node) |
590 |
| -{ |
591 |
| - return irq_alloc_descs(-1, from, 1, node); |
592 |
| -} |
| 583 | +void irq_free_descs(unsigned int irq, unsigned int cnt); |
| 584 | +int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
593 | 585 |
|
594 | 586 | static inline void irq_free_desc(unsigned int irq)
|
595 | 587 | {
|
|
0 commit comments