mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-20 22:15:59 +00:00
[PATCH] genirq: cleanup: no_irq_type cleanups
Clean up no_irq_type: share the NOP functions where possible, and properly name the ack_bad() function. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8d28bc751b
commit
77a5afecdb
1 changed files with 25 additions and 20 deletions
|
@ -40,32 +40,37 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic 'no controller' code
|
* What should we do if we get a hw irq event on an illegal vector?
|
||||||
|
* Each architecture has to answer this themself.
|
||||||
*/
|
*/
|
||||||
static void end_none(unsigned int irq) { }
|
static void ack_bad(unsigned int irq)
|
||||||
static void enable_none(unsigned int irq) { }
|
|
||||||
static void disable_none(unsigned int irq) { }
|
|
||||||
static void shutdown_none(unsigned int irq) { }
|
|
||||||
static unsigned int startup_none(unsigned int irq) { return 0; }
|
|
||||||
|
|
||||||
static void ack_none(unsigned int irq)
|
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* 'what should we do if we get a hw irq event on an illegal vector'.
|
|
||||||
* each architecture has to answer this themself.
|
|
||||||
*/
|
|
||||||
ack_bad_irq(irq);
|
ack_bad_irq(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NOP functions
|
||||||
|
*/
|
||||||
|
static void noop(unsigned int irq)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned int noop_ret(unsigned int irq)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic no controller implementation
|
||||||
|
*/
|
||||||
struct hw_interrupt_type no_irq_type = {
|
struct hw_interrupt_type no_irq_type = {
|
||||||
.typename = "none",
|
.typename = "none",
|
||||||
.startup = startup_none,
|
.startup = noop_ret,
|
||||||
.shutdown = shutdown_none,
|
.shutdown = noop,
|
||||||
.enable = enable_none,
|
.enable = noop,
|
||||||
.disable = disable_none,
|
.disable = noop,
|
||||||
.ack = ack_none,
|
.ack = ack_bad,
|
||||||
.end = end_none,
|
.end = noop,
|
||||||
.set_affinity = NULL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue