diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 1595f9176b43..15e6c3905f41 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -171,7 +171,36 @@ static inline int irq_has_action(unsigned int irq) return desc->action != NULL; } +/* caller has locked the irq_desc and both params are valid */ +static inline void __irq_set_handler_locked(unsigned int irq, + irq_flow_handler_t handler) +{ + struct irq_desc *desc; + + desc = irq_to_desc(irq); + desc->handle_irq = handler; +} + +/* caller has locked the irq_desc and both params are valid */ +static inline void +__irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, + irq_flow_handler_t handler, const char *name) +{ + struct irq_desc *desc; + + desc = irq_to_desc(irq); + irq_desc_get_irq_data(desc)->chip = chip; + desc->handle_irq = handler; + desc->name = name; +} + #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT +static inline void __set_irq_handler_unlocked(int irq, + irq_flow_handler_t handler) +{ + __irq_set_handler_locked(irq, handler); +} + static inline int irq_balancing_disabled(unsigned int irq) { struct irq_desc *desc; @@ -181,16 +210,6 @@ static inline int irq_balancing_disabled(unsigned int irq) } #endif -/* caller has locked the irq_desc and both params are valid */ -static inline void __set_irq_handler_unlocked(int irq, - irq_flow_handler_t handler) -{ - struct irq_desc *desc; - - desc = irq_to_desc(irq); - desc->handle_irq = handler; -} - static inline void irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) {