summaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-11-19 23:49:18 +0100
committerLen Brown <len.brown@intel.com>2008-02-02 00:30:54 +0100
commit825257569350e913bee3bc918508c0aa6e3398cd (patch)
tree2d016a04dfc09938565d5e932f0d2d5e43fb6bdd /kernel/power/power.h
parentPM: Make PM_TRACE more architecture independent (diff)
downloadlinux-825257569350e913bee3bc918508c0aa6e3398cd.tar.xz
linux-825257569350e913bee3bc918508c0aa6e3398cd.zip
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 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index f9f0d4d26c50..a9732fd12239 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -172,14 +172,10 @@ static inline int suspend_devices_and_enter(suspend_state_t state)
}
#endif /* !CONFIG_SUSPEND */
-/* kernel/power/common.c */
-extern struct blocking_notifier_head pm_chain_head;
-
-static inline int pm_notifier_call_chain(unsigned long val)
-{
- return (blocking_notifier_call_chain(&pm_chain_head, val, NULL)
- == NOTIFY_BAD) ? -EINVAL : 0;
-}
+#ifdef CONFIG_PM_SLEEP
+/* kernel/power/main.c */
+extern int pm_notifier_call_chain(unsigned long val);
+#endif
#ifdef CONFIG_HIGHMEM
unsigned int count_highmem_pages(void);