mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irq: call also chip->irq_mask from irq_disable
@ 2011-09-14  8:57 Tero Kristo
  2011-09-14 16:04 ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Tero Kristo @ 2011-09-14  8:57 UTC (permalink / raw)
  To: linux-kernel

Current implementation of the irq_disable only calls chip->irq_disable.
This fails to disable interrupt on some chip implementations, as there
are two alternative chip specific functions for this task,
chip->irq_disable and chip->irq_mask. Added alternative path for
chip->irq_disable also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 kernel/irq/chip.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index d5a3009..15597f1 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -198,10 +198,11 @@ void irq_enable(struct irq_desc *desc)
 void irq_disable(struct irq_desc *desc)
 {
 	irq_state_set_disabled(desc);
-	if (desc->irq_data.chip->irq_disable) {
+	if (desc->irq_data.chip->irq_disable)
 		desc->irq_data.chip->irq_disable(&desc->irq_data);
-		irq_state_set_masked(desc);
-	}
+	else
+		desc->irq_data.chip->irq_mask(&desc->irq_data);
+	irq_state_set_masked(desc);
 }
 
 static inline void mask_ack_irq(struct irq_desc *desc)
-- 
1.7.4.1


Texas Instruments Oy, Tekniikantie 12, 02150 Espoo. Y-tunnus: 0115040-6. Kotipaikka: Helsinki
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-15  7:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-14  8:57 [PATCH] irq: call also chip->irq_mask from irq_disable Tero Kristo
2011-09-14 16:04 ` Thomas Gleixner
2011-09-14 18:01   ` Tero Kristo
2011-09-14 19:50     ` Thomas Gleixner
2011-09-15  7:22       ` Tero Kristo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®