aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/irq.h51
-rw-r--r--kernel/irq/chip.c16
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;
398extern struct irq_chip dummy_irq_chip; 398extern struct irq_chip dummy_irq_chip;
399 399
400extern void 400extern void
401set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, 401irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
402 irq_flow_handler_t handle);
403extern void
404set_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
404static 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
407extern void 410extern 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 */
414static inline void 414static inline void
415set_irq_handler(unsigned int irq, irq_flow_handler_t handle) 415irq_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 */
425static inline void 425static inline void
426set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) 426irq_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
431void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); 431void 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}
582static inline void
583set_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}
588static inline void
589set_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}
594static 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}
600static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
601{
602 irq_set_handler(irq, handle);
603}
604static inline void
605set_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
584int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); 611int 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
602void 602void
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,
635out: 635out:
636 irq_put_desc_busunlock(desc, flags); 636 irq_put_desc_busunlock(desc, flags);
637} 637}
638EXPORT_SYMBOL_GPL(__set_irq_handler); 638EXPORT_SYMBOL_GPL(__irq_set_handler);
639 639
640void 640void
641set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, 641irq_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
648void
649set_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
656void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) 648void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)