PM / sleep: prohibit devices probing during suspend/hibernation
authorStrashko, Grygorii <grygorii.strashko@ti.com>
Tue, 10 Nov 2015 09:42:34 +0000 (11:42 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Nov 2015 13:47:22 +0000 (14:47 +0100)
commit013c074f8642d8e815ad670601f8e27155a74b57
tree66eb244459aa071de90db3cb258370e7aeb1e910
parent31ade3b83e1821da5fbb2f11b5b3d4ab2ec39db8
PM / sleep: prohibit devices probing during suspend/hibernation

It is unsafe [1] if probing of devices will happen during suspend or
hibernation and system behavior will be unpredictable in this case.
So, let's prohibit device's probing in dpm_prepare() and defer their
probing instead. The normal behavior will be restored in
dpm_complete().

This patch introduces new DD core APIs:
 device_block_probing()
   It will disable probing of devices and defer their probes instead.
 device_unblock_probing()
   It will restore normal behavior and trigger re-probing of deferred
   devices.

[1] https://lkml.org/lkml/2015/9/11/554

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/base.h
drivers/base/dd.c
drivers/base/power/main.c