]> git.itanic.dy.fi Git - linux-stable/commit
PM / core: Fix direct_complete handling for devices with no callbacks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 May 2018 11:02:17 +0000 (13:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 May 2018 12:50:11 +0000 (14:50 +0200)
commitc62ec4610c40bcc44f2d3d5ed1c312737279e2f3
treef94b9d7e5e3da53373c8c77448f15c4c582c3999
parent771c577c23bac90597c685971d7297ea00f99d11
PM / core: Fix direct_complete handling for devices with no callbacks

Commit 08810a4119aa (PM / core: Add NEVER_SKIP and SMART_PREPARE
driver flags) inadvertently prevented the power.direct_complete flag
from being set for devices without PM callbacks and with disabled
runtime PM which also prevents power.direct_complete from being set
for their parents.  That led to problems including a resume crash on
HP ZBook 14u.

Restore the previous behavior by causing power.direct_complete to be
set for those devices again, but do that in a more direct way to
avoid overlooking that case in the future.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=199693
Fixes: 08810a4119aa (PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags)
Reported-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
Cc: 4.15+ <stable@vger.kernel.org> # 4.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
drivers/base/power/main.c