WSL2-Linux-Kernel/drivers/base
Rafael J. Wysocki 9226c504e3 PM: runtime: Resume the device earlier in __device_release_driver()
Since the device is resumed from runtime-suspend in
__device_release_driver() anyway, it is better to do that before
looking for busy managed device links from it to consumers, because
if there are any, device_links_unbind_consumers() will be called
and it will cause the consumer devices' drivers to unbind, so the
consumer devices will be runtime-resumed.  In turn, resuming each
consumer device will cause the supplier to be resumed and when the
runtime PM references from the given consumer to it are dropped, it
may be suspended.  Then, the runtime-resume of the next consumer
will cause the supplier to resume again and so on.

Update the code accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Fixes: 9ed9895370 ("driver core: Functional dependencies tracking support")
Cc: All applicable <stable@vger.kernel.org> # All applicable
Tested-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-02 18:14:07 +01:00
..
firmware_loader
power PM: runtime: Drop pm_runtime_clean_up_links() 2020-11-02 18:14:07 +01:00
regmap
test
Kconfig
Makefile
arch_topology.c
attribute_container.c
base.h
bus.c
cacheinfo.c
class.c
component.c
container.c
core.c PM: runtime: Drop runtime PM references to supplier on link removal 2020-11-02 18:14:07 +01:00
cpu.c
dd.c PM: runtime: Resume the device earlier in __device_release_driver() 2020-11-02 18:14:07 +01:00
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
map.c
memory.c
module.c
node.c
pinctrl.c
platform-msi.c
platform.c
property.c
soc.c
swnode.c
syscore.c
topology.c
transport_class.c