aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-07-19 04:47:36 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:42 -0400
commitb10d911749d37dccfa5873d2088aea3f074b9e45 (patch)
tree56bd0ccb2861d7ae562d4e48a737727628358b42 /kernel/power/power.h
parentc2cf7d87d804c66e063829d5ca739053e901dc15 (diff)
PM: introduce hibernation and suspend notifiers
Make it possible to register hibernation and suspend notifiers, so that subsystems can perform hibernation-related or suspend-related operations that should not be carried out by device drivers' .suspend() and .resume() routines. [akpm@linux-foundation.org: build fixes] [akpm@linux-foundation.org: cleanups] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@nigel.suspend2.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index eab3603b7caf..01c2275b15b2 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -173,5 +173,15 @@ extern void swsusp_close(void);
173extern int suspend_enter(suspend_state_t state); 173extern int suspend_enter(suspend_state_t state);
174 174
175struct timeval; 175struct timeval;
176/* kernel/power/swsusp.c */
176extern void swsusp_show_speed(struct timeval *, struct timeval *, 177extern void swsusp_show_speed(struct timeval *, struct timeval *,
177 unsigned int, char *); 178 unsigned int, char *);
179
180/* kernel/power/main.c */
181extern struct blocking_notifier_head pm_chain_head;
182
183static inline int pm_notifier_call_chain(unsigned long val)
184{
185 return (blocking_notifier_call_chain(&pm_chain_head, val, NULL)
186 == NOTIFY_BAD) ? -EINVAL : 0;
187}