aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-01-07 18:08:44 -0500
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:58 -0500
commitcaea99ef339af8e07cda8d03fa415e4b8820f400 (patch)
tree46b975f61a3409a30fc6a7c15a6db2c7f6d9876b /include
parent60417f5976df029227450b46d7fa6f0e9b1e654c (diff)
Hibernation: Introduce begin() and end() callbacks
Introduce global hibernation callback .end() and rename global hibernation callback .start() to .begin(), in analogy with the recent modifications of the global suspend callbacks. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/suspend.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index a0b1dbb5919f..646ce2d068d4 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -136,14 +136,17 @@ extern void mark_free_pages(struct zone *zone);
136/** 136/**
137 * struct platform_hibernation_ops - hibernation platform support 137 * struct platform_hibernation_ops - hibernation platform support
138 * 138 *
139 * The methods in this structure allow a platform to override the default 139 * The methods in this structure allow a platform to carry out special
140 * mechanism of shutting down the machine during a hibernation transition. 140 * operations required by it during a hibernation transition.
141 * 141 *
142 * All three methods must be assigned. 142 * All the methods below must be implemented.
143 * 143 *
144 * @start: Tell the platform driver that we're starting hibernation. 144 * @begin: Tell the platform driver that we're starting hibernation.
145 * Called right after shrinking memory and before freezing devices. 145 * Called right after shrinking memory and before freezing devices.
146 * 146 *
147 * @end: Called by the PM core right after resuming devices, to indicate to
148 * the platform that the system has returned to the working state.
149 *
147 * @pre_snapshot: Prepare the platform for creating the hibernation image. 150 * @pre_snapshot: Prepare the platform for creating the hibernation image.
148 * Called right after devices have been frozen and before the nonboot 151 * Called right after devices have been frozen and before the nonboot
149 * CPUs are disabled (runs with IRQs on). 152 * CPUs are disabled (runs with IRQs on).
@@ -178,7 +181,8 @@ extern void mark_free_pages(struct zone *zone);
178 * thawing devices (runs with IRQs on). 181 * thawing devices (runs with IRQs on).
179 */ 182 */
180struct platform_hibernation_ops { 183struct platform_hibernation_ops {
181 int (*start)(void); 184 int (*begin)(void);
185 void (*end)(void);
182 int (*pre_snapshot)(void); 186 int (*pre_snapshot)(void);
183 void (*finish)(void); 187 void (*finish)(void);
184 int (*prepare)(void); 188 int (*prepare)(void);