IRQ: Typedef the IRQ flow handler function type

Typedef the IRQ flow handler function type.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 8e973fbdf5716b93a0a8c0365be33a31ca0fa351 commit)
This commit is contained in:
David Howells 2006-10-05 13:06:34 +01:00 committed by David Howells
parent d223a60106
commit 57a58a9435
2 changed files with 15 additions and 27 deletions

View File

@ -22,6 +22,12 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
struct irq_desc;
typedef void fastcall (*irq_flow_handler_t)(unsigned int irq,
struct irq_desc *desc,
struct pt_regs *regs);
/* /*
* IRQ line status. * IRQ line status.
* *
@ -139,9 +145,7 @@ struct irq_chip {
* Pad this out to 32 bytes for cache and indexing reasons. * Pad this out to 32 bytes for cache and indexing reasons.
*/ */
struct irq_desc { struct irq_desc {
void fastcall (*handle_irq)(unsigned int irq, irq_flow_handler_t handle_irq;
struct irq_desc *desc,
struct pt_regs *regs);
struct irq_chip *chip; struct irq_chip *chip;
void *handler_data; void *handler_data;
void *chip_data; void *chip_data;
@ -281,9 +285,7 @@ handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
* Get a descriptive string for the highlevel handler, for * Get a descriptive string for the highlevel handler, for
* /proc/interrupts output: * /proc/interrupts output:
*/ */
extern const char * extern const char *handle_irq_name(irq_flow_handler_t handle);
handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
struct pt_regs *));
/* /*
* Monolithic do_IRQ implementation. * Monolithic do_IRQ implementation.
@ -335,22 +337,15 @@ extern struct irq_chip dummy_irq_chip;
extern void extern void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
void fastcall (*handle)(unsigned int, irq_flow_handler_t handle);
struct irq_desc *,
struct pt_regs *));
extern void extern void
__set_irq_handler(unsigned int irq, __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained);
void fastcall (*handle)(unsigned int, struct irq_desc *,
struct pt_regs *),
int is_chained);
/* /*
* Set a highlevel flow handler for a given IRQ: * Set a highlevel flow handler for a given IRQ:
*/ */
static inline void static inline void
set_irq_handler(unsigned int irq, set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
void fastcall (*handle)(unsigned int, struct irq_desc *,
struct pt_regs *))
{ {
__set_irq_handler(irq, handle, 0); __set_irq_handler(irq, handle, 0);
} }
@ -362,8 +357,7 @@ set_irq_handler(unsigned int irq,
*/ */
static inline void static inline void
set_irq_chained_handler(unsigned int irq, set_irq_chained_handler(unsigned int irq,
void fastcall (*handle)(unsigned int, struct irq_desc *, irq_flow_handler_t handle)
struct pt_regs *))
{ {
__set_irq_handler(irq, handle, 1); __set_irq_handler(irq, handle, 1);
} }

View File

@ -505,10 +505,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
void void
__set_irq_handler(unsigned int irq, __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained)
void fastcall (*handle)(unsigned int, irq_desc_t *,
struct pt_regs *),
int is_chained)
{ {
struct irq_desc *desc; struct irq_desc *desc;
unsigned long flags; unsigned long flags;
@ -561,9 +558,7 @@ __set_irq_handler(unsigned int irq,
void void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
void fastcall (*handle)(unsigned int, irq_flow_handler_t handle)
struct irq_desc *,
struct pt_regs *))
{ {
set_irq_chip(irq, chip); set_irq_chip(irq, chip);
__set_irq_handler(irq, handle, 0); __set_irq_handler(irq, handle, 0);
@ -574,8 +569,7 @@ set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
* /proc/interrupts output: * /proc/interrupts output:
*/ */
const char * const char *
handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, handle_irq_name(irq_flow_handler_t handle)
struct pt_regs *))
{ {
if (handle == handle_level_irq) if (handle == handle_level_irq)
return "level "; return "level ";