]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
IRQ: Typedef the IRQ handler function type
authorDavid Howells <dhowells@redhat.com>
Thu, 5 Oct 2006 12:06:34 +0000 (13:06 +0100)
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>
Thu, 5 Oct 2006 12:28:27 +0000 (13:28 +0100)
Typedef the IRQ handler function type.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1356d1e5fd256997e3d3dce0777ab787d0515c7a commit)

include/linux/interrupt.h
kernel/irq/manage.c

index 1f97e3d92639e75aaed86a8066518e2526fa1dee..19782350dcc8f6a2fef887c6a961ae1d99c78e68 100644 (file)
 #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 *);
 
index 92be519eff26fe3fd467eb6ca0e3e063a36f50ce..6879202afe9a3c2d49b5b81ee187a151ce4f7e55 100644 (file)
@@ -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);
-