Messages in this thread Patch in this message | | | Subject | [PATCH 3/3] genirq: Give warning in case calling irq_set_irq_wake with _NO_SUSPEND flag | From | Chuansheng Liu <> | Date | Tue, 12 Mar 2013 01:59:13 +0800 |
| |
When one irq is setup with flag IRQF_NO_SUSPEND, it is pointless to call irq_set_irq_wake().
Because check_wakeup_irqs() is just checking the irq which has pending but is in IRQS_SUSPENDED state when do syscore_suspend().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com> --- kernel/irq/manage.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index fa17855..94c5af9 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -513,6 +513,14 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on) if (!desc) return -EINVAL; + /* Checking if the flag IRQF_NO_SUSPEND is set, + * if set, drivers do not need to call irq_set_irq_wake(), + * it is pointless. + */ + if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND)) + WARN(1, "IRQ %d with flag IRQF_NO_SUSPEND, no need to call here\n", + irq); + /* wakeup-capable irqs can be shared between drivers that * don't need to have the same sleep mode behaviors. */ -- 1.7.0.4
| |