aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-08 06:44:58 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:18 -0500
commitc531e8361f1968d664e6e97fbd3bfa4cf0e62e42 (patch)
tree45b5dbd85203033af684a9588224044289236b0c /kernel
parent6e40262ea43c4b0e3f435b3a083e4461ef921c17 (diff)
genirq: Move IRQ_SUSPENDED to core
No users outside of core. 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.c8
-rw-r--r--kernel/irq/pm.c6
3 files changed, 9 insertions, 7 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 3f2fcc194dcc..46889119e6a6 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -48,6 +48,7 @@ enum {
48 * IRQS_DISABLED - irq is disabled 48 * IRQS_DISABLED - irq is disabled
49 * IRQS_PENDING - irq is pending and replayed later 49 * IRQS_PENDING - irq is pending and replayed later
50 * IRQS_MASKED - irq is masked 50 * IRQS_MASKED - irq is masked
51 * IRQS_SUSPENDED - irq is suspended
51 */ 52 */
52enum { 53enum {
53 IRQS_AUTODETECT = 0x00000001, 54 IRQS_AUTODETECT = 0x00000001,
@@ -60,6 +61,7 @@ enum {
60 IRQS_DISABLED = 0x00000100, 61 IRQS_DISABLED = 0x00000100,
61 IRQS_PENDING = 0x00000200, 62 IRQS_PENDING = 0x00000200,
62 IRQS_MASKED = 0x00000400, 63 IRQS_MASKED = 0x00000400,
64 IRQS_SUSPENDED = 0x00000800,
63}; 65};
64 66
65#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data) 67#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 83fd20194e5b..b912de4ff4de 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -326,7 +326,7 @@ void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
326 if (suspend) { 326 if (suspend) {
327 if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND)) 327 if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND))
328 return; 328 return;
329 desc->status |= IRQ_SUSPENDED; 329 desc->istate |= IRQS_SUSPENDED;
330 } 330 }
331 331
332 if (!desc->depth++) 332 if (!desc->depth++)
@@ -388,7 +388,7 @@ EXPORT_SYMBOL(disable_irq);
388void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume) 388void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
389{ 389{
390 if (resume) { 390 if (resume) {
391 if (!(desc->status & IRQ_SUSPENDED)) { 391 if (!(desc->istate & IRQS_SUSPENDED)) {
392 if (!desc->action) 392 if (!desc->action)
393 return; 393 return;
394 if (!(desc->action->flags & IRQF_FORCE_RESUME)) 394 if (!(desc->action->flags & IRQF_FORCE_RESUME))
@@ -396,7 +396,7 @@ void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
396 /* Pretend that it got disabled ! */ 396 /* Pretend that it got disabled ! */
397 desc->depth++; 397 desc->depth++;
398 } 398 }
399 desc->status &= ~IRQ_SUSPENDED; 399 desc->istate &= ~IRQS_SUSPENDED;
400 } 400 }
401 401
402 switch (desc->depth) { 402 switch (desc->depth) {
@@ -405,7 +405,7 @@ void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
405 WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq); 405 WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
406 break; 406 break;
407 case 1: { 407 case 1: {
408 if (desc->status & IRQ_SUSPENDED) 408 if (desc->istate & IRQS_SUSPENDED)
409 goto err_out; 409 goto err_out;
410 /* Prevent probing on this irq: */ 410 /* Prevent probing on this irq: */
411 desc->status |= IRQ_NOPROBE; 411 desc->status |= IRQ_NOPROBE;
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index d7389418e91a..d81337fc1cff 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -18,7 +18,7 @@
18 * During system-wide suspend or hibernation device drivers need to be prevented 18 * During system-wide suspend or hibernation device drivers need to be prevented
19 * from receiving interrupts and this function is provided for this purpose. 19 * from receiving interrupts and this function is provided for this purpose.
20 * It marks all interrupt lines in use, except for the timer ones, as disabled 20 * It marks all interrupt lines in use, except for the timer ones, as disabled
21 * and sets the IRQ_SUSPENDED flag for each of them. 21 * and sets the IRQS_SUSPENDED flag for each of them.
22 */ 22 */
23void suspend_device_irqs(void) 23void suspend_device_irqs(void)
24{ 24{
@@ -34,7 +34,7 @@ void suspend_device_irqs(void)
34 } 34 }
35 35
36 for_each_irq_desc(irq, desc) 36 for_each_irq_desc(irq, desc)
37 if (desc->status & IRQ_SUSPENDED) 37 if (desc->istate & IRQS_SUSPENDED)
38 synchronize_irq(irq); 38 synchronize_irq(irq);
39} 39}
40EXPORT_SYMBOL_GPL(suspend_device_irqs); 40EXPORT_SYMBOL_GPL(suspend_device_irqs);
@@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(suspend_device_irqs);
43 * resume_device_irqs - enable interrupt lines disabled by suspend_device_irqs() 43 * resume_device_irqs - enable interrupt lines disabled by suspend_device_irqs()
44 * 44 *
45 * Enable all interrupt lines previously disabled by suspend_device_irqs() that 45 * Enable all interrupt lines previously disabled by suspend_device_irqs() that
46 * have the IRQ_SUSPENDED flag set. 46 * have the IRQS_SUSPENDED flag set.
47 */ 47 */
48void resume_device_irqs(void) 48void resume_device_irqs(void)
49{ 49{