Messages in this thread Patch in this message | | | From | Tomeu Vizoso <> | Subject | [PATCH] PM / sleep: Don't unset parent's direct_complete | Date | Wed, 25 Mar 2015 16:27:55 +0100 |
| |
If a device isn't going to be fully-suspended because there isn't an implementation of the suspend callback, there's no need to make sure that its parent is going to be fully-suspended as well.
Without this change, USB interface devices will always prevent the proper USB device to stay in runtime suspension when the system suspends.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> ---
Hi,
I'm not sure if this is the right fix, because I don't see why the USB interface devices are in the dpm_list in the first place, so any comments will be welcome.
Thanks,
Tomeu
--- drivers/base/power/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 3d874ec..6bac53f 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1438,7 +1438,9 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) if (parent) { spin_lock_irq(&parent->power.lock); - dev->parent->power.direct_complete = false; + if (callback) + parent->power.direct_complete = false; + if (dev->power.wakeup_path && !dev->parent->power.ignore_children) dev->parent->power.wakeup_path = true; -- 2.1.0
| |