diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-24 05:57:39 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-24 05:57:39 +0400 |
commit | 25c263542ddf9396012b6a6fa2b327d304f7f9a3 (patch) | |
tree | d7258f81da125b0bf4a2ce0ede2e79db38a7ed04 /include | |
parent | d8581969904b8a72db726c4b9090234c0f0bb18f (diff) | |
parent | 7c2399756ab8ccb2c57da4630b4aa4a1d61b3846 (diff) | |
download | linux-25c263542ddf9396012b6a6fa2b327d304f7f9a3.tar.xz |
Merge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
[SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
drivers/char/riscom8: clean up irq handling
isdn/sc: irq handler clean
isdn/act2000: fix major bug. clean irq handler.
char/pcmcia/synclink_cs: trim trailing whitespace
drivers/char/ip2: separate polling and irq-driven work entry points
drivers/char/ip2: split out irq core logic into separate function
[NETDRVR] lib82596, netxen: delete pointless tests from irq handler
Eliminate pointless casts from void* in a few driver irq handlers.
[PARPORT] Remove unused 'irq' argument from parport irq functions
[PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}
[PARPORT] Consolidate code copies into a single generic irq handler
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/parport.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/parport.h b/include/linux/parport.h index ec3f76598327..d1ad546c8c9e 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -100,6 +100,7 @@ typedef enum { #include <linux/proc_fs.h> #include <linux/spinlock.h> #include <linux/wait.h> +#include <linux/irqreturn.h> #include <asm/system.h> #include <asm/ptrace.h> #include <asm/semaphore.h> @@ -229,7 +230,7 @@ struct pardevice { int (*preempt)(void *); void (*wakeup)(void *); void *private; - void (*irq_func)(int, void *); + void (*irq_func)(void *); unsigned int flags; struct pardevice *next; struct pardevice *prev; @@ -366,6 +367,9 @@ extern void parport_unregister_driver (struct parport_driver *); extern struct parport *parport_find_number (int); extern struct parport *parport_find_base (unsigned long); +/* generic irq handler, if it suits your needs */ +extern irqreturn_t parport_irq_handler(int irq, void *dev_id); + /* Reference counting for ports. */ extern struct parport *parport_get_port (struct parport *); extern void parport_put_port (struct parport *); @@ -379,7 +383,7 @@ extern void parport_put_port (struct parport *); struct pardevice *parport_register_device(struct parport *port, const char *name, int (*pf)(void *), void (*kf)(void *), - void (*irq_func)(int, void *), + void (*irq_func)(void *), int flags, void *handle); /* parport_unregister unlinks a device from the chain. */ @@ -461,7 +465,7 @@ static __inline__ int parport_yield_blocking(struct pardevice *dev) #define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */ /* IEEE1284 functions */ -extern void parport_ieee1284_interrupt (int, void *); +extern void parport_ieee1284_interrupt (void *); extern int parport_negotiate (struct parport *, int mode); extern ssize_t parport_write (struct parport *, const void *buf, size_t len); extern ssize_t parport_read (struct parport *, void *buf, size_t len); @@ -503,23 +507,19 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *, /* IEEE1284.3 functions */ extern int parport_daisy_init (struct parport *port); extern void parport_daisy_fini (struct parport *port); -extern struct pardevice *parport_open (int devnum, const char *name, - int (*pf) (void *), - void (*kf) (void *), - void (*irqf) (int, void *), - int flags, void *handle); +extern struct pardevice *parport_open (int devnum, const char *name); extern void parport_close (struct pardevice *dev); extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); extern void parport_daisy_deselect_all (struct parport *port); extern int parport_daisy_select (struct parport *port, int daisy, int mode); /* Lowlevel drivers _can_ call this support function to handle irqs. */ -static __inline__ void parport_generic_irq(int irq, struct parport *port) +static inline void parport_generic_irq(struct parport *port) { - parport_ieee1284_interrupt (irq, port); + parport_ieee1284_interrupt (port); read_lock(&port->cad_lock); if (port->cad && port->cad->irq_func) - port->cad->irq_func(irq, port->cad->private); + port->cad->irq_func(port->cad->private); read_unlock(&port->cad_lock); } |