PM / Sleep: Add macro to define common late/early system PM callbacks
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Dec 2013 13:37:42 +0000 (14:37 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 22 Dec 2013 00:39:14 +0000 (01:39 +0100)
commitf78c4cffb86a9f1732674d810ac338cd694b1885
tree6e380151ecb79ed7aeed9e87a2a4d651161a2b85
parente0c7855e364dda1ddd65b0b092cfc07ce9d66373
PM / Sleep: Add macro to define common late/early system PM callbacks

We use the same approach as for the existing SET_SYSTEM_SLEEP_PM_OPS,
but for the late and early callbacks instead.

The new SET_LATE_SYSTEM_SLEEP_PM_OPS, defined for CONFIG_PM_SLEEP, will
point ->suspend_late, ->freeze_late and ->poweroff_late to the same
function. Vice verse happens for ->resume_early, ->thaw_early and
->restore_early.

Cc: Kevin Hilman <khilman@linaro.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/pm.h