summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-10-05 13:06:34 +0100
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-10-05 13:28:27 +0100
commitda482792a6d1a3fbaaa25fae867b343fb4db3246 (patch)
tree138c187e669bbaf997780a999299fbc977568e1c
parent57a58a9435aef3e0342ba4b2c97e0ddfea6f2c7f (diff)
downloadlinux-da482792a6d1a3fbaaa25fae867b343fb4db3246.tar.bz2
IRQ: Typedef the IRQ handler function type
Typedef the IRQ handler function type. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1356d1e5fd256997e3d3dce0777ab787d0515c7a commit)
-rw-r--r--include/linux/interrupt.h7
-rw-r--r--kernel/irq/manage.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 1f97e3d92639..19782350dcc8 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -64,8 +64,10 @@
#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
+typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *);
+
struct irqaction {
- irqreturn_t (*handler)(int, void *, struct pt_regs *);
+ irq_handler_t handler;
unsigned long flags;
cpumask_t mask;
const char *name;
@@ -76,8 +78,7 @@ struct irqaction {
};
extern irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs);
-extern int request_irq(unsigned int,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
+extern int request_irq(unsigned int, irq_handler_t handler,
unsigned long, const char *, void *);
extern void free_irq(unsigned int, void *);
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 92be519eff26..6879202afe9a 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -427,8 +427,7 @@ EXPORT_SYMBOL(free_irq);
* IRQF_SAMPLE_RANDOM The interrupt can be used for entropy
*
*/
-int request_irq(unsigned int irq,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
+int request_irq(unsigned int irq, irq_handler_t handler,
unsigned long irqflags, const char *devname, void *dev_id)
{
struct irqaction *action;
@@ -475,4 +474,3 @@ int request_irq(unsigned int irq,
return retval;
}
EXPORT_SYMBOL(request_irq);
-