summaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorFeng Kan2018-04-11 01:57:06 +0200
committerRafael J. Wysocki2018-04-24 12:18:25 +0200
commit494fd7b7ad10c33d3a7ff7d10b71b3ecad10474a (patch)
tree142266c224b8a9ac90ebb9850861ddbb1c0d118c /drivers/base/base.h
parentLinux 4.17-rc2 (diff)
downloadkernel-qcow2-linux-494fd7b7ad10c33d3a7ff7d10b71b3ecad10474a.tar.gz
kernel-qcow2-linux-494fd7b7ad10c33d3a7ff7d10b71b3ecad10474a.tar.xz
kernel-qcow2-linux-494fd7b7ad10c33d3a7ff7d10b71b3ecad10474a.zip
PM / core: fix deferred probe breaking suspend resume order
When bridge and its endpoint is enumerated the devices are added to the dpm list. Afterward, the bridge defers probe when IOMMU is not ready. This causes the bridge to be moved to the end of the dpm list when deferred probe kicks in. The order of the dpm list for bridge and endpoint is reversed. Add reordering code to move the bridge and its children and consumers to the end of the pm list so the order for suspend and resume is not altered. The code also move device and its children and consumers to the tail of device_kset list if it is registered. Signed-off-by: Toan Le <toanle@apm.com> Signed-off-by: Feng Kan <fkan@apm.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index d800de650fa5..a75c3025fb78 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -161,3 +161,6 @@ extern void device_links_driver_cleanup(struct device *dev);
extern void device_links_no_driver(struct device *dev);
extern bool device_links_busy(struct device *dev);
extern void device_links_unbind_consumers(struct device *dev);
+
+/* device pm support */
+void device_pm_move_to_tail(struct device *dev);