alistair23-linux/drivers/base/power
Rafael J. Wysocki 69e445ab8b PM / core: Clear the direct_complete flag on errors
If __device_suspend() runs asynchronously (in which case the device
passed to it is in dpm_suspended_list at that point) and it returns
early on an error or pending wakeup, and the power.direct_complete
flag has been set for the device already, the subsequent
device_resume() will be confused by that and it will call
pm_runtime_enable() incorrectly, as runtime PM has not been
disabled for the device by __device_suspend().

To avoid that, clear power.direct_complete if __device_suspend()
is not going to disable runtime PM for the device before returning.

Fixes: aae4518b31 (PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily)
Reported-by: Al Cooper <alcooperx@gmail.com>
Tested-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-10-04 19:39:31 +02:00
..
clock_ops.c PM / clk: signedness bug in of_pm_clk_add_clks() 2018-08-24 11:52:34 +02:00
common.c PM / Domains: Introduce dev_pm_domain_attach_by_name() 2018-07-09 12:11:02 +02:00
domain.c Driver core patches for 4.19-rc1 2018-08-18 11:44:53 -07:00
domain_governor.c PM / QoS: Fix device resume latency framework 2017-11-08 12:14:51 +01:00
generic_ops.c PM / sleep: Remove pm_complete_with_resume_check() 2017-10-11 15:40:29 +02:00
main.c PM / core: Clear the direct_complete flag on errors 2018-10-04 19:39:31 +02:00
Makefile Merge branches 'pm-cpufreq-sched' and 'pm-opp' 2017-11-13 01:40:52 +01:00
power.h PM / core: Drop unused internal inline functions for sysfs 2018-05-10 11:55:12 +02:00
qos.c PM / QoS: Fix device resume latency framework 2017-11-08 12:14:51 +01:00
runtime.c Revert "PM / runtime: Fixup reference counting of device link suppliers at probe" 2018-06-12 10:24:13 +02:00
sysfs.c PM / wakeup: Export wakeup_count instead of event_count via sysfs 2018-06-06 09:23:36 +02:00
trace.c timekeeping: Ignore the bogus sleep time if pm_trace is enabled 2016-11-29 18:02:58 +01:00
wakeirq.c PM / wakeirq: Add wakeup name to dedicated wake irqs 2018-02-26 23:23:37 +01:00
wakeup.c Merge branches 'pm-pci', 'acpi-pm', 'pm-sleep' and 'pm-avs' 2018-06-04 10:41:53 +02:00