PM / sleep: Make async suspend/resume of devices use device links
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 30 Oct 2016 16:28:49 +0000 (17:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 17:42:51 +0000 (11:42 -0600)
commit8c73b4288496407d91bc616df3f7c62a88356cb2
treebcbe494732ed13c518504738fe5f79b8de41f1e2
parent9ed9895370aedd6032af2a9181c62c394d08223b
PM / sleep: Make async suspend/resume of devices use device links

Make the device suspend/resume part of the core system
suspend/resume code use device links to ensure that supplier
and consumer devices will be suspended and resumed in the right
order in case of async suspend/resume.

The idea, roughly, is to use dpm_wait() to wait for all consumers
before a supplier device suspend and to wait for all suppliers
before a consumer device resume.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/main.c