diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-27 05:02:49 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-27 11:45:58 -0400 |
commit | 801a0e9ae36e9b487092e31699d28c0b9a21ad52 (patch) | |
tree | c448d150797272b09417f5410e7570742e59368b /kernel/irq/chip.c | |
parent | d72274e5895d11570a0a4a3214a1933c86d5ccb7 (diff) |
genirq: Add irq disabled flag to irq_data state
Some irq_chip implementation require to know the disabled state of the
interrupt in certain callbacks. Add a state flag and accessor to
irq_data.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index c35d74c08b50..0a890bdd9c63 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -141,12 +141,14 @@ EXPORT_SYMBOL_GPL(irq_get_irq_data); | |||
141 | static void irq_state_clr_disabled(struct irq_desc *desc) | 141 | static void irq_state_clr_disabled(struct irq_desc *desc) |
142 | { | 142 | { |
143 | desc->istate &= ~IRQS_DISABLED; | 143 | desc->istate &= ~IRQS_DISABLED; |
144 | irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
144 | irq_compat_clr_disabled(desc); | 145 | irq_compat_clr_disabled(desc); |
145 | } | 146 | } |
146 | 147 | ||
147 | static void irq_state_set_disabled(struct irq_desc *desc) | 148 | static void irq_state_set_disabled(struct irq_desc *desc) |
148 | { | 149 | { |
149 | desc->istate |= IRQS_DISABLED; | 150 | desc->istate |= IRQS_DISABLED; |
151 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
150 | irq_compat_set_disabled(desc); | 152 | irq_compat_set_disabled(desc); |
151 | } | 153 | } |
152 | 154 | ||
@@ -648,8 +650,7 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
648 | if (handle == handle_bad_irq) { | 650 | if (handle == handle_bad_irq) { |
649 | if (desc->irq_data.chip != &no_irq_chip) | 651 | if (desc->irq_data.chip != &no_irq_chip) |
650 | mask_ack_irq(desc); | 652 | mask_ack_irq(desc); |
651 | irq_compat_set_disabled(desc); | 653 | irq_state_set_disabled(desc); |
652 | desc->istate |= IRQS_DISABLED; | ||
653 | desc->depth = 1; | 654 | desc->depth = 1; |
654 | } | 655 | } |
655 | desc->handle_irq = handle; | 656 | desc->handle_irq = handle; |