diff options
-rw-r--r-- | include/linux/irq.h | 51 | ||||
-rw-r--r-- | kernel/irq/chip.c | 16 |
2 files changed, 43 insertions, 24 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index c101ad4b821f..3e29e2f42e04 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -398,23 +398,23 @@ extern struct irq_chip no_irq_chip; | |||
398 | extern struct irq_chip dummy_irq_chip; | 398 | extern struct irq_chip dummy_irq_chip; |
399 | 399 | ||
400 | extern void | 400 | extern void |
401 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 401 | irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, |
402 | irq_flow_handler_t handle); | ||
403 | extern void | ||
404 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
405 | irq_flow_handler_t handle, const char *name); | 402 | irq_flow_handler_t handle, const char *name); |
406 | 403 | ||
404 | static inline void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
405 | irq_flow_handler_t handle) | ||
406 | { | ||
407 | irq_set_chip_and_handler_name(irq, chip, handle, NULL); | ||
408 | } | ||
409 | |||
407 | extern void | 410 | extern void |
408 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | 411 | __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
409 | const char *name); | 412 | const char *name); |
410 | 413 | ||
411 | /* | ||
412 | * Set a highlevel flow handler for a given IRQ: | ||
413 | */ | ||
414 | static inline void | 414 | static inline void |
415 | set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | 415 | irq_set_handler(unsigned int irq, irq_flow_handler_t handle) |
416 | { | 416 | { |
417 | __set_irq_handler(irq, handle, 0, NULL); | 417 | __irq_set_handler(irq, handle, 0, NULL); |
418 | } | 418 | } |
419 | 419 | ||
420 | /* | 420 | /* |
@@ -423,9 +423,9 @@ set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | |||
423 | * IRQ_NOREQUEST and IRQ_NOPROBE) | 423 | * IRQ_NOREQUEST and IRQ_NOPROBE) |
424 | */ | 424 | */ |
425 | static inline void | 425 | static inline void |
426 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) | 426 | irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) |
427 | { | 427 | { |
428 | __set_irq_handler(irq, handle, 1, NULL); | 428 | __irq_set_handler(irq, handle, 1, NULL); |
429 | } | 429 | } |
430 | 430 | ||
431 | void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); | 431 | void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); |
@@ -579,6 +579,33 @@ static inline void set_irq_nested_thread(unsigned int irq, int nest) | |||
579 | { | 579 | { |
580 | irq_set_nested_thread(irq, nest); | 580 | irq_set_nested_thread(irq, nest); |
581 | } | 581 | } |
582 | static inline void | ||
583 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
584 | irq_flow_handler_t handle, const char *name) | ||
585 | { | ||
586 | irq_set_chip_and_handler_name(irq, chip, handle, name); | ||
587 | } | ||
588 | static inline void | ||
589 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
590 | irq_flow_handler_t handle) | ||
591 | { | ||
592 | irq_set_chip_and_handler(irq, chip, handle); | ||
593 | } | ||
594 | static inline void | ||
595 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | ||
596 | const char *name) | ||
597 | { | ||
598 | __irq_set_handler(irq, handle, is_chained, name); | ||
599 | } | ||
600 | static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | ||
601 | { | ||
602 | irq_set_handler(irq, handle); | ||
603 | } | ||
604 | static inline void | ||
605 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) | ||
606 | { | ||
607 | irq_set_chained_handler(irq, handle); | ||
608 | } | ||
582 | #endif | 609 | #endif |
583 | 610 | ||
584 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); | 611 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 3ea6aecd99c0..2a36038b8f59 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -600,7 +600,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) | |||
600 | } | 600 | } |
601 | 601 | ||
602 | void | 602 | void |
603 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | 603 | __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
604 | const char *name) | 604 | const char *name) |
605 | { | 605 | { |
606 | unsigned long flags; | 606 | unsigned long flags; |
@@ -635,22 +635,14 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
635 | out: | 635 | out: |
636 | irq_put_desc_busunlock(desc, flags); | 636 | irq_put_desc_busunlock(desc, flags); |
637 | } | 637 | } |
638 | EXPORT_SYMBOL_GPL(__set_irq_handler); | 638 | EXPORT_SYMBOL_GPL(__irq_set_handler); |
639 | 639 | ||
640 | void | 640 | void |
641 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 641 | irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, |
642 | irq_flow_handler_t handle) | ||
643 | { | ||
644 | irq_set_chip(irq, chip); | ||
645 | __set_irq_handler(irq, handle, 0, NULL); | ||
646 | } | ||
647 | |||
648 | void | ||
649 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
650 | irq_flow_handler_t handle, const char *name) | 642 | irq_flow_handler_t handle, const char *name) |
651 | { | 643 | { |
652 | irq_set_chip(irq, chip); | 644 | irq_set_chip(irq, chip); |
653 | __set_irq_handler(irq, handle, 0, name); | 645 | __irq_set_handler(irq, handle, 0, name); |
654 | } | 646 | } |
655 | 647 | ||
656 | void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) | 648 | void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) |