From: Rafael J. Wysocki Date: Mon, 24 Sep 2012 11:31:38 +0000 (+0200) Subject: Merge branch 'pm-sleep' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=057d51a1268fe4be039db8ff0791fcfcb63a4f1b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'pm-sleep' * pm-sleep: PM: Prevent runtime suspend during system resume PM / Sleep: use resume event when call dpm_resume_early Conflicts: drivers/base/power/main.c (trivial) --- 057d51a1268fe4be039db8ff0791fcfcb63a4f1b diff --cc drivers/base/power/main.c index 57f5814c2732,077b9756fd8f..008e6786ae79 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@@ -1231,9 -1208,14 +1230,17 @@@ static int device_prepare(struct devic char *info = NULL; int error = 0; + if (dev->power.syscore) + return 0; + + /* + * If a device's parent goes into runtime suspend at the wrong time, + * it won't be possible to resume the device. To prevent this we + * block runtime suspend here, during the prepare phase, and allow + * it again during the complete phase. + */ + pm_runtime_get_noresume(dev); + device_lock(dev); dev->power.wakeup_path = device_may_wakeup(dev);