mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
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>
This commit is contained in:
parent
90dda1cb6a
commit
8252575693
3 changed files with 32 additions and 21 deletions
|
|
@ -213,17 +213,8 @@ void save_processor_state(void);
|
|||
void restore_processor_state(void);
|
||||
|
||||
/* kernel/power/main.c */
|
||||
extern struct blocking_notifier_head pm_chain_head;
|
||||
|
||||
static inline int register_pm_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return blocking_notifier_chain_register(&pm_chain_head, nb);
|
||||
}
|
||||
|
||||
static inline int unregister_pm_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return blocking_notifier_chain_unregister(&pm_chain_head, nb);
|
||||
}
|
||||
extern int register_pm_notifier(struct notifier_block *nb);
|
||||
extern int unregister_pm_notifier(struct notifier_block *nb);
|
||||
|
||||
#define pm_notifier(fn, pri) { \
|
||||
static struct notifier_block fn##_nb = \
|
||||
|
|
|
|||
Loading…
Reference in a new issue