diff options
Diffstat (limited to 'include/linux/irqreturn.h')
-rw-r--r-- | include/linux/irqreturn.h | 28 |
1 files changed, 10 insertions, 18 deletions
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 |