Unverified Commit 30410880 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!8858 PCI/PM: Drain runtime-idle callbacks before driver removal

parents 1c6912ef bb61a9fa
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -442,6 +442,13 @@ static int pci_device_remove(struct device *dev)
	if (drv) {
		if (drv->remove) {
			pm_runtime_get_sync(dev);
			/*
			 * If the driver provides a .runtime_idle() callback and it has
			 * started to run already, it may continue to run in parallel
			 * with the code below, so wait until all of the runtime PM
			 * activity has completed.
			 */
			pm_runtime_barrier(dev);
			drv->remove(pci_dev);
			pm_runtime_put_noidle(dev);
		}