diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-08 11:28:12 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:20 -0500 |
commit | 876dbd4cc1b35c1a4cb96a2be1d43ea0eabce3b4 (patch) | |
tree | 9be1e7e4cd4a4c9fadd98a9ac637020417215521 /kernel/irq/chip.c | |
parent | 2bdd10558c8d93009cb6c32ce9e30800fbb08add (diff) |
genirq: Mirror irq trigger type bits in irq_data.state
That's the data structure chip functions get provided. Also allow them
to signal the core code that they updated the flags in irq_data.state
by returning IRQ_SET_MASK_OK_NOCOPY. The default is unchanged.
The type bits should be accessed via:
val = irqd_get_trigger_type(irqdata);
and
irqd_set_trigger_type(irqdata, val);
Coders who access them directly will be tracked down and slapped with
stinking trouts.
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, 4 insertions, 1 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index b8aa3dfe8301..9c9b573a718e 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -710,11 +710,14 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) | |||
710 | 710 | ||
711 | irq_settings_clr_and_set(desc, clr, set); | 711 | irq_settings_clr_and_set(desc, clr, set); |
712 | 712 | ||
713 | irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU); | 713 | irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU | |
714 | IRQD_TRIGGER_MASK | IRQD_LEVEL); | ||
714 | if (irq_settings_has_no_balance_set(desc)) | 715 | if (irq_settings_has_no_balance_set(desc)) |
715 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); | 716 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); |
716 | if (irq_settings_is_per_cpu(desc)) | 717 | if (irq_settings_is_per_cpu(desc)) |
717 | irqd_set(&desc->irq_data, IRQD_PER_CPU); | 718 | irqd_set(&desc->irq_data, IRQD_PER_CPU); |
718 | 719 | ||
720 | irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc)); | ||
721 | |||
719 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 722 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
720 | } | 723 | } |