aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-19 20:33:19 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-10-31 19:32:35 -0400
commitec53cf23c0ddb0c29950b9a4ac46964c4c6c6c2f (patch)
tree198b2e172c5d9043ee10341092900e584c5f97f6 /include/linux
parent1d58996da6a8045c8df2899ce5689a19c721322f (diff)
irq: don't put module.h into irq.h for tracking irqgen modules.
Recent commit "irq: Track the owner of irq descriptor" in commit ID b6873807a7143b7 placed module.h into linux/irq.h but we are trying to limit module.h inclusion to just C files that really need it, due to its size and number of children includes. This targets just reversing that include. Add in the basic "struct module" since that is all we really need to ensure things compile. In theory, b687380 should have added the module.h include to the irqdesc.h header as well, but the implicit module.h everywhere presence masked this from showing up. So give it the "struct module" as well. As for the C files, irqdesc.c is only using THIS_MODULE, so it does not need module.h - give it export.h instead. The C file irq/manage.c is now (as of b687380) using try_module_get and module_put and so it needs module.h (which it already has). Also convert the irq_alloc_descs variants to macros, since all they really do is is call the __irq_alloc_descs primitive. This avoids including export.h and no debug info is lost. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/irq.h32
-rw-r--r--include/linux/irqdesc.h1
2 files changed, 13 insertions, 20 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 59e49c80cc2..bff29c58da2 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
32struct seq_file; 31struct seq_file;
32struct module;
33struct irq_desc; 33struct irq_desc;
34struct irq_data; 34struct irq_data;
35typedef void (*irq_flow_handler_t)(unsigned int irq, 35typedef 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)
567int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, 567int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
568 struct module *owner); 568 struct module *owner);
569 569
570static 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
576void irq_free_descs(unsigned int irq, unsigned int cnt); 574#define irq_alloc_desc(node) \
577int irq_reserve_irqs(unsigned int from, unsigned int cnt); 575 irq_alloc_descs(-1, 0, 1, node)
578 576
579static 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
584static 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
589static inline int irq_alloc_desc_from(unsigned int from, int node) 583void irq_free_descs(unsigned int irq, unsigned int cnt);
590{ 584int irq_reserve_irqs(unsigned int from, unsigned int cnt);
591 return irq_alloc_descs(-1, from, 1, node);
592}
593 585
594static inline void irq_free_desc(unsigned int irq) 586static inline void irq_free_desc(unsigned int irq)
595{ 587{
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 6b69c2c9dff..f1e2527006b 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -11,6 +11,7 @@
11struct irq_affinity_notify; 11struct irq_affinity_notify;
12struct proc_dir_entry; 12struct proc_dir_entry;
13struct timer_rand_state; 13struct timer_rand_state;
14struct module;
14/** 15/**
15 * struct irq_desc - interrupt descriptor 16 * struct irq_desc - interrupt descriptor
16 * @irq_data: per irq and chip data passed down to chip functions 17 * @irq_data: per irq and chip data passed down to chip functions