summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2021-10-16 13:04:24 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2021-10-16 13:04:24 +0200
commitf8e718054f4421d11638e370b933ccc6c77466ed (patch)
tree973ff8cb8aed7d8e4da6a194456ddc01c206b7de /drivers/base
parentd900385139e5aa8d584dee92c87bb85d0226253e (diff)
parent1392fe82d7fba00ba4a8e01968935f2b2085d5a4 (diff)
Merge tag 'v4.4.288' into toradex_vf_4.4
This is the 4.4.288 stable release Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c1
-rw-r--r--drivers/base/power/wakeirq.c14
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7e419aaf3c24..23517100c9a5 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -710,6 +710,7 @@ void device_initialize(struct device *dev)
device_pm_init(dev);
set_dev_node(dev, -1);
#ifdef CONFIG_GENERIC_MSI_IRQ
+ raw_spin_lock_init(&dev->msi_lock);
INIT_LIST_HEAD(&dev->msi_list);
#endif
}
diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c
index feba1b211898..8c05e7a5e777 100644
--- a/drivers/base/power/wakeirq.c
+++ b/drivers/base/power/wakeirq.c
@@ -319,8 +319,13 @@ void dev_pm_arm_wake_irq(struct wake_irq *wirq)
if (!wirq)
return;
- if (device_may_wakeup(wirq->dev))
+ if (device_may_wakeup(wirq->dev)) {
+ if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
+ !pm_runtime_status_suspended(wirq->dev))
+ enable_irq(wirq->irq);
+
enable_irq_wake(wirq->irq);
+ }
}
/**
@@ -335,6 +340,11 @@ void dev_pm_disarm_wake_irq(struct wake_irq *wirq)
if (!wirq)
return;
- if (device_may_wakeup(wirq->dev))
+ if (device_may_wakeup(wirq->dev)) {
disable_irq_wake(wirq->irq);
+
+ if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
+ !pm_runtime_status_suspended(wirq->dev))
+ disable_irq_nosync(wirq->irq);
+ }
}