diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 21:57:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 21:57:39 -0400 |
commit | 25c263542ddf9396012b6a6fa2b327d304f7f9a3 (patch) | |
tree | d7258f81da125b0bf4a2ce0ede2e79db38a7ed04 /include/linux | |
parent | d8581969904b8a72db726c4b9090234c0f0bb18f (diff) | |
parent | 7c2399756ab8ccb2c57da4630b4aa4a1d61b3846 (diff) |
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/linux')
-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 { | |||
100 | #include <linux/proc_fs.h> | 100 | #include <linux/proc_fs.h> |
101 | #include <linux/spinlock.h> | 101 | #include <linux/spinlock.h> |
102 | #include <linux/wait.h> | 102 | #include <linux/wait.h> |
103 | #include <linux/irqreturn.h> | ||
103 | #include <asm/system.h> | 104 | #include <asm/system.h> |
104 | #include <asm/ptrace.h> | 105 | #include <asm/ptrace.h> |
105 | #include <asm/semaphore.h> | 106 | #include <asm/semaphore.h> |
@@ -229,7 +230,7 @@ struct pardevice { | |||
229 | int (*preempt)(void *); | 230 | int (*preempt)(void *); |
230 | void (*wakeup)(void *); | 231 | void (*wakeup)(void *); |
231 | void *private; | 232 | void *private; |
232 | void (*irq_func)(int, void *); | 233 | void (*irq_func)(void *); |
233 | unsigned int flags; | 234 | unsigned int flags; |
234 | struct pardevice *next; | 235 | struct pardevice *next; |
235 | struct pardevice *prev; | 236 | struct pardevice *prev; |
@@ -366,6 +367,9 @@ extern void parport_unregister_driver (struct parport_driver *); | |||
366 | extern struct parport *parport_find_number (int); | 367 | extern struct parport *parport_find_number (int); |
367 | extern struct parport *parport_find_base (unsigned long); | 368 | extern struct parport *parport_find_base (unsigned long); |
368 | 369 | ||
370 | /* generic irq handler, if it suits your needs */ | ||
371 | extern irqreturn_t parport_irq_handler(int irq, void *dev_id); | ||
372 | |||
369 | /* Reference counting for ports. */ | 373 | /* Reference counting for ports. */ |
370 | extern struct parport *parport_get_port (struct parport *); | 374 | extern struct parport *parport_get_port (struct parport *); |
371 | extern void parport_put_port (struct parport *); | 375 | extern void parport_put_port (struct parport *); |
@@ -379,7 +383,7 @@ extern void parport_put_port (struct parport *); | |||
379 | struct pardevice *parport_register_device(struct parport *port, | 383 | struct pardevice *parport_register_device(struct parport *port, |
380 | const char *name, | 384 | const char *name, |
381 | int (*pf)(void *), void (*kf)(void *), | 385 | int (*pf)(void *), void (*kf)(void *), |
382 | void (*irq_func)(int, void *), | 386 | void (*irq_func)(void *), |
383 | int flags, void *handle); | 387 | int flags, void *handle); |
384 | 388 | ||
385 | /* parport_unregister unlinks a device from the chain. */ | 389 | /* parport_unregister unlinks a device from the chain. */ |
@@ -461,7 +465,7 @@ static __inline__ int parport_yield_blocking(struct pardevice *dev) | |||
461 | #define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */ | 465 | #define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */ |
462 | 466 | ||
463 | /* IEEE1284 functions */ | 467 | /* IEEE1284 functions */ |
464 | extern void parport_ieee1284_interrupt (int, void *); | 468 | extern void parport_ieee1284_interrupt (void *); |
465 | extern int parport_negotiate (struct parport *, int mode); | 469 | extern int parport_negotiate (struct parport *, int mode); |
466 | extern ssize_t parport_write (struct parport *, const void *buf, size_t len); | 470 | extern ssize_t parport_write (struct parport *, const void *buf, size_t len); |
467 | extern ssize_t parport_read (struct parport *, void *buf, size_t len); | 471 | 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 *, | |||
503 | /* IEEE1284.3 functions */ | 507 | /* IEEE1284.3 functions */ |
504 | extern int parport_daisy_init (struct parport *port); | 508 | extern int parport_daisy_init (struct parport *port); |
505 | extern void parport_daisy_fini (struct parport *port); | 509 | extern void parport_daisy_fini (struct parport *port); |
506 | extern struct pardevice *parport_open (int devnum, const char *name, | 510 | extern struct pardevice *parport_open (int devnum, const char *name); |
507 | int (*pf) (void *), | ||
508 | void (*kf) (void *), | ||
509 | void (*irqf) (int, void *), | ||
510 | int flags, void *handle); | ||
511 | extern void parport_close (struct pardevice *dev); | 511 | extern void parport_close (struct pardevice *dev); |
512 | extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); | 512 | extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); |
513 | extern void parport_daisy_deselect_all (struct parport *port); | 513 | extern void parport_daisy_deselect_all (struct parport *port); |
514 | extern int parport_daisy_select (struct parport *port, int daisy, int mode); | 514 | extern int parport_daisy_select (struct parport *port, int daisy, int mode); |
515 | 515 | ||
516 | /* Lowlevel drivers _can_ call this support function to handle irqs. */ | 516 | /* Lowlevel drivers _can_ call this support function to handle irqs. */ |
517 | static __inline__ void parport_generic_irq(int irq, struct parport *port) | 517 | static inline void parport_generic_irq(struct parport *port) |
518 | { | 518 | { |
519 | parport_ieee1284_interrupt (irq, port); | 519 | parport_ieee1284_interrupt (port); |
520 | read_lock(&port->cad_lock); | 520 | read_lock(&port->cad_lock); |
521 | if (port->cad && port->cad->irq_func) | 521 | if (port->cad && port->cad->irq_func) |
522 | port->cad->irq_func(irq, port->cad->private); | 522 | port->cad->irq_func(port->cad->private); |
523 | read_unlock(&port->cad_lock); | 523 | read_unlock(&port->cad_lock); |
524 | } | 524 | } |
525 | 525 | ||