aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2011-02-09 19:04:25 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-10 18:25:13 -0500
commit986c011ddbb3ed44b35e1bfd67f6aa60b293b495 (patch)
treedefe8664b0287dcda9a7c0767b629eeae0504519 /kernel/irq/manage.c
parent100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff)
genirq: Call bus_lock/unlock functions in setup_irq()
irq_chips that supply .irq_bus_lock/.irq_bus_sync_unlock functions, expect that the other chip methods will be called inside of calls to the pair. If this expectation is not met, things tend to not work. Make setup_irq() call chip_bus_lock()/chip_bus_sync_unlock() too. For the vast majority of irq_chips, this will be a NOP as most don't have these bus lock functions. [ tglx: No we don't want to call that in __setup_irq(). Way too many error exit pathes. ] Signed-off-by: David Daney <ddaney@caviumnetworks.com> LKML-Reference: <1297296265-18680-1-git-send-email-ddaney@caviumnetworks.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0caa59f747dd..a00bf2cd67ed 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -871,9 +871,14 @@ out_thread:
871 */ 871 */
872int setup_irq(unsigned int irq, struct irqaction *act) 872int setup_irq(unsigned int irq, struct irqaction *act)
873{ 873{
874 int retval;
874 struct irq_desc *desc = irq_to_desc(irq); 875 struct irq_desc *desc = irq_to_desc(irq);
875 876
876 return __setup_irq(irq, desc, act); 877 chip_bus_lock(desc);
878 retval = __setup_irq(irq, desc, act);
879 chip_bus_sync_unlock(desc);
880
881 return retval;
877} 882}
878EXPORT_SYMBOL_GPL(setup_irq); 883EXPORT_SYMBOL_GPL(setup_irq);
879 884