summaryrefslogtreecommitdiffstats
path: root/kernel/irq/chip.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-04 10:17:52 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 12:58:11 +0100
commit3aae994fb0f43f6d94a31c33536a83869504abdf (patch)
treef928d2067cecfbb89c1133a8b513f84c890f7e9d /kernel/irq/chip.c
parent50f7c0327513d5acefbe26fd33498af18d1ffac5 (diff)
downloadop-kernel-dev-3aae994fb0f43f6d94a31c33536a83869504abdf.zip
op-kernel-dev-3aae994fb0f43f6d94a31c33536a83869504abdf.tar.gz
genirq: Consolidate IRQ_DISABLED
Handle IRQ_DISABLED consistent. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r--kernel/irq/chip.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 1a239a8..43c62ca 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -194,11 +194,14 @@ EXPORT_SYMBOL_GPL(set_irq_nested_thread);
int irq_startup(struct irq_desc *desc)
{
- desc->status &= ~(IRQ_MASKED | IRQ_DISABLED);
+ desc->status &= ~IRQ_DISABLED;
desc->depth = 0;
- if (desc->irq_data.chip->irq_startup)
- return desc->irq_data.chip->irq_startup(&desc->irq_data);
+ if (desc->irq_data.chip->irq_startup) {
+ int ret = desc->irq_data.chip->irq_startup(&desc->irq_data);
+ desc->status &= ~IRQ_MASKED;
+ return ret;
+ }
irq_enable(desc);
return 0;
@@ -206,7 +209,7 @@ int irq_startup(struct irq_desc *desc)
void irq_shutdown(struct irq_desc *desc)
{
- desc->status |= IRQ_MASKED | IRQ_DISABLED;
+ desc->status |= IRQ_DISABLED;
desc->depth = 1;
if (desc->irq_data.chip->irq_shutdown)
desc->irq_data.chip->irq_shutdown(&desc->irq_data);
@@ -214,10 +217,12 @@ void irq_shutdown(struct irq_desc *desc)
desc->irq_data.chip->irq_disable(&desc->irq_data);
else
desc->irq_data.chip->irq_mask(&desc->irq_data);
+ desc->status |= IRQ_MASKED;
}
void irq_enable(struct irq_desc *desc)
{
+ desc->status &= ~IRQ_DISABLED;
if (desc->irq_data.chip->irq_enable)
desc->irq_data.chip->irq_enable(&desc->irq_data);
else
@@ -227,6 +232,7 @@ void irq_enable(struct irq_desc *desc)
void irq_disable(struct irq_desc *desc)
{
+ desc->status |= IRQ_DISABLED;
if (desc->irq_data.chip->irq_disable) {
desc->irq_data.chip->irq_disable(&desc->irq_data);
desc->status |= IRQ_MASKED;
OpenPOWER on IntegriCloud