2020-11-06 07:36:05

by Patrice CHOTARD

[permalink] [raw]
Subject: [PATCH v1 3/4] PM: core: Make usage of device_wakeup_path() helper

From: Patrice Chotard <[email protected]>

Make usage of dev_wakeup_path() helper.

Signed-off-by: Patrice Chotard <[email protected]>
---
drivers/base/power/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index c7ac49042cee..921c5b2ec30a 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -1359,7 +1359,7 @@ static void dpm_propagate_wakeup_to_parent(struct device *dev)

spin_lock_irq(&parent->power.lock);

- if (dev->power.wakeup_path && !parent->power.ignore_children)
+ if (device_wakeup_path(dev) && !parent->power.ignore_children)
parent->power.wakeup_path = true;

spin_unlock_irq(&parent->power.lock);
@@ -1627,7 +1627,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
goto Complete;

/* Avoid direct_complete to let wakeup_path propagate. */
- if (device_may_wakeup(dev) || dev->power.wakeup_path)
+ if (device_may_wakeup(dev) || device_wakeup_path(dev))
dev->power.direct_complete = false;

if (dev->power.direct_complete) {
--
2.17.1