diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-09-30 17:14:27 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-03-13 09:32:29 -0400 |
commit | bedd30d986a05e32dc3eab874e4b9ed8a38058bb (patch) | |
tree | 2da3b52decc7f2c407d96664cd3be8c5659cc14c /include/linux | |
parent | c8e2aeef0b8ac9fb8821b8b3734c031579d0b77a (diff) |
genirq: make irqreturn_t an enum
Impact: cleanup
Remove the 2.4 compabiliy cruft
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/irq.h | 4 | ||||
-rw-r--r-- | include/linux/irqreturn.h | 28 |
2 files changed, 12 insertions, 20 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 7c07a09931db..19770923bcb0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -280,7 +280,7 @@ static inline int irq_balancing_disabled(unsigned int irq) | |||
280 | } | 280 | } |
281 | 281 | ||
282 | /* Handle irq action chains: */ | 282 | /* Handle irq action chains: */ |
283 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); | 283 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); |
284 | 284 | ||
285 | /* | 285 | /* |
286 | * Built-in IRQ handlers for various IRQ types, | 286 | * Built-in IRQ handlers for various IRQ types, |
@@ -325,7 +325,7 @@ static inline void generic_handle_irq(unsigned int irq) | |||
325 | 325 | ||
326 | /* Handling of unhandled and spurious interrupts: */ | 326 | /* Handling of unhandled and spurious interrupts: */ |
327 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | 327 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, |
328 | int action_ret); | 328 | irqreturn_t action_ret); |
329 | 329 | ||
330 | /* Resending of interrupts :*/ | 330 | /* Resending of interrupts :*/ |
331 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 331 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h index 881883c2009d..c5584ca5b8c9 100644 --- a/include/linux/irqreturn.h +++ b/include/linux/irqreturn.h | |||
@@ -1,25 +1,17 @@ | |||
1 | /* irqreturn.h */ | ||
2 | #ifndef _LINUX_IRQRETURN_H | 1 | #ifndef _LINUX_IRQRETURN_H |
3 | #define _LINUX_IRQRETURN_H | 2 | #define _LINUX_IRQRETURN_H |
4 | 3 | ||
5 | /* | 4 | /** |
6 | * For 2.4.x compatibility, 2.4.x can use | 5 | * enum irqreturn |
7 | * | 6 | * @IRQ_NONE interrupt was not from this device |
8 | * typedef void irqreturn_t; | 7 | * @IRQ_HANDLED interrupt was handled by this device |
9 | * #define IRQ_NONE | ||
10 | * #define IRQ_HANDLED | ||
11 | * #define IRQ_RETVAL(x) | ||
12 | * | ||
13 | * To mix old-style and new-style irq handler returns. | ||
14 | * | ||
15 | * IRQ_NONE means we didn't handle it. | ||
16 | * IRQ_HANDLED means that we did have a valid interrupt and handled it. | ||
17 | * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled) | ||
18 | */ | 8 | */ |
19 | typedef int irqreturn_t; | 9 | enum irqreturn { |
10 | IRQ_NONE, | ||
11 | IRQ_HANDLED, | ||
12 | }; | ||
20 | 13 | ||
21 | #define IRQ_NONE (0) | 14 | typedef enum irqreturn irqreturn_t; |
22 | #define IRQ_HANDLED (1) | 15 | #define IRQ_RETVAL(x) ((x) != IRQ_NONE) |
23 | #define IRQ_RETVAL(x) ((x) != 0) | ||
24 | 16 | ||
25 | #endif | 17 | #endif |