aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-11-19 17:49:18 -0500
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:54 -0500
commit825257569350e913bee3bc918508c0aa6e3398cd (patch)
tree2d016a04dfc09938565d5e932f0d2d5e43fb6bdd /include/linux
parent90dda1cb6ace6abd777f84bf051c4f86fa58986a (diff)
PM: Convert PM notifiers to out-of-line code
This patch (as1008b) converts the PM notifier routines from inline calls to out-of-line code. It also prevents pm_chain_head from being created when CONFIG_PM_SLEEP isn't enabled, and EXPORTs the notifier registration and unregistration routines. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/suspend.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 40280df2a3db..51283e0745b3 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -213,17 +213,8 @@ void save_processor_state(void);
213void restore_processor_state(void); 213void restore_processor_state(void);
214 214
215/* kernel/power/main.c */ 215/* kernel/power/main.c */
216extern struct blocking_notifier_head pm_chain_head; 216extern int register_pm_notifier(struct notifier_block *nb);
217 217extern int unregister_pm_notifier(struct notifier_block *nb);
218static inline int register_pm_notifier(struct notifier_block *nb)
219{
220 return blocking_notifier_chain_register(&pm_chain_head, nb);
221}
222
223static inline int unregister_pm_notifier(struct notifier_block *nb)
224{
225 return blocking_notifier_chain_unregister(&pm_chain_head, nb);
226}
227 218
228#define pm_notifier(fn, pri) { \ 219#define pm_notifier(fn, pri) { \
229 static struct notifier_block fn##_nb = \ 220 static struct notifier_block fn##_nb = \