summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-10 19:46:26 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 12:58:22 +0100
commit7f94226f03299f1ca32f118f02f2a0295e0e5e93 (patch)
tree049a83a3c264d4378f341991800c345bf4eeb5a5 /kernel
parentd4d5e08960844a062da8387ee5f16ca7a33200d0 (diff)
genirq: Move wakeup state to irq_data
Some irq_chips need to know the state of wakeup mode for setting the trigger type etc. Reflect it in irq_data state. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/internals.h2
-rw-r--r--kernel/irq/manage.c4
-rw-r--r--kernel/irq/pm.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 1d500fbde0d4..5e2366da9f38 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -46,7 +46,6 @@ enum {
* IRQS_PENDING - irq is pending and replayed later
* IRQS_MASKED - irq is masked
* IRQS_SUSPENDED - irq is suspended
- * IRQS_WAKEUP - irq triggers system wakeup from suspend
*/
enum {
IRQS_AUTODETECT = 0x00000001,
@@ -60,7 +59,6 @@ enum {
IRQS_PENDING = 0x00000200,
IRQS_MASKED = 0x00000400,
IRQS_SUSPENDED = 0x00000800,
- IRQS_WAKEUP = 0x00001000,
};
#include "compat.h"
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 50809c79c7ad..ea6add6036b1 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -492,7 +492,7 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on)
if (ret)
desc->wake_depth = 0;
else
- desc->istate |= IRQS_WAKEUP;
+ irqd_set(&desc->irq_data, IRQD_WAKEUP_STATE);
}
} else {
if (desc->wake_depth == 0) {
@@ -502,7 +502,7 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on)
if (ret)
desc->wake_depth = 1;
else
- desc->istate &= ~IRQS_WAKEUP;
+ irqd_clear(&desc->irq_data, IRQD_WAKEUP_STATE);
}
}
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index f39383d8672d..1329f0eff49e 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -69,7 +69,7 @@ int check_wakeup_irqs(void)
int irq;
for_each_irq_desc(irq, desc)
- if ((desc->istate & IRQS_WAKEUP) &&
+ if (irqd_is_wakeup_set(&desc->irq_data) &&
(desc->istate & IRQS_PENDING))
return -EBUSY;