Commit f6d9330e authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

Allow gcc to generate better code for irq handling.

Ok, now that most drivers have been converted to the new
irqreturn_t, we can remove the fascist type-checks and just
use a regular integer type which has a simpler calling
convention.
parent 778c87e7
...@@ -213,7 +213,7 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * ...@@ -213,7 +213,7 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
do { do {
status |= action->flags; status |= action->flags;
retval |= action->handler(irq, action->dev_id, regs).val; retval |= action->handler(irq, action->dev_id, regs);
action = action->next; action = action->next;
} while (action); } while (action);
if (status & SA_SAMPLE_RANDOM) if (status & SA_SAMPLE_RANDOM)
......
...@@ -25,13 +25,11 @@ ...@@ -25,13 +25,11 @@
* IRQ_HANDLED means that we did have a valid interrupt and handled it. * IRQ_HANDLED means that we did have a valid interrupt and handled it.
* IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled) * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
*/ */
typedef struct irqreturn { typedef int irqreturn_t;
unsigned int val;
} irqreturn_t;
#define IRQ_NONE ((struct irqreturn) { 0 }) #define IRQ_NONE (0)
#define IRQ_HANDLED ((struct irqreturn) { 1 }) #define IRQ_HANDLED (1)
#define IRQ_RETVAL(x) ((struct irqreturn) { (x) != 0 }) #define IRQ_RETVAL(x) ((x) != 0)
struct irqaction { struct irqaction {
irqreturn_t (*handler)(int, void *, struct pt_regs *); irqreturn_t (*handler)(int, void *, struct pt_regs *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment