From: Kevin Hilman Date: Tue, 18 Dec 2007 17:05:58 +0000 (+0100) Subject: genirq: add unlocked version of set_irq_handler() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b019e57321f3e006c0ec7a54f13efc377bcb6451;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git genirq: add unlocked version of set_irq_handler() Add unlocked version for use by irq_chip.set_type handlers which may wish to change handler to level or edge handler when IRQ type is changed. The normal set_irq_handler() call cannot be used because it tries to take irq_desc.lock which is already held when the irq_chip.set_type hook is called. Signed-off-by: Kevin Hilman Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/include/linux/irq.h b/include/linux/irq.h index efc88538b2ba..4669be080617 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -339,6 +339,13 @@ extern void __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, const char *name); +/* 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) +{ + irq_desc[irq].handle_irq = handler; +} + /* * Set a highlevel flow handler for a given IRQ: */