irq: don't put module.h into irq.h for tracking irqgen modules.
Recent commit "irq: Track the owner of irq descriptor" in commit IDb6873807a7
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 ofb687380
) 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>
This commit is contained in:
parent
1d58996da6
commit
ec53cf23c0
|
@ -23,13 +23,13 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/topology.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/irq_regs.h>
|
||||
|
||||
struct seq_file;
|
||||
struct module;
|
||||
struct irq_desc;
|
||||
struct irq_data;
|
||||
typedef void (*irq_flow_handler_t)(unsigned int irq,
|
||||
|
@ -567,30 +567,22 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d)
|
|||
int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
|
||||
struct module *owner);
|
||||
|
||||
static inline int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt,
|
||||
int node)
|
||||
{
|
||||
return __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE);
|
||||
}
|
||||
/* use macros to avoid needing export.h for THIS_MODULE */
|
||||
#define irq_alloc_descs(irq, from, cnt, node) \
|
||||
__irq_alloc_descs(irq, from, cnt, node, THIS_MODULE)
|
||||
|
||||
#define irq_alloc_desc(node) \
|
||||
irq_alloc_descs(-1, 0, 1, node)
|
||||
|
||||
#define irq_alloc_desc_at(at, node) \
|
||||
irq_alloc_descs(at, at, 1, node)
|
||||
|
||||
#define irq_alloc_desc_from(from, node) \
|
||||
irq_alloc_descs(-1, from, 1, node)
|
||||
|
||||
void irq_free_descs(unsigned int irq, unsigned int cnt);
|
||||
int irq_reserve_irqs(unsigned int from, unsigned int cnt);
|
||||
|
||||
static inline int irq_alloc_desc(int node)
|
||||
{
|
||||
return irq_alloc_descs(-1, 0, 1, node);
|
||||
}
|
||||
|
||||
static inline int irq_alloc_desc_at(unsigned int at, int node)
|
||||
{
|
||||
return irq_alloc_descs(at, at, 1, node);
|
||||
}
|
||||
|
||||
static inline int irq_alloc_desc_from(unsigned int from, int node)
|
||||
{
|
||||
return irq_alloc_descs(-1, from, 1, node);
|
||||
}
|
||||
|
||||
static inline void irq_free_desc(unsigned int irq)
|
||||
{
|
||||
irq_free_descs(irq, 1);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
struct irq_affinity_notify;
|
||||
struct proc_dir_entry;
|
||||
struct timer_rand_state;
|
||||
struct module;
|
||||
/**
|
||||
* struct irq_desc - interrupt descriptor
|
||||
* @irq_data: per irq and chip data passed down to chip functions
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
#include <linux/irq.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/radix-tree.h>
|
||||
|
|
Loading…
Reference in New Issue