mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
PM / sleep: Refactor filesystems sync to reduce duplication
Create a common helper to sync filesystems for system suspend and hibernation. Signed-off-by: Harry Pan <harry.pan@intel.com> Acked-by: Pavel Machek <pavel@ucw.cz> [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
74a1dd86d1
commit
b5dee3130b
@@ -425,6 +425,7 @@ void restore_processor_state(void);
|
||||
/* kernel/power/main.c */
|
||||
extern int register_pm_notifier(struct notifier_block *nb);
|
||||
extern int unregister_pm_notifier(struct notifier_block *nb);
|
||||
extern void ksys_sync_helper(void);
|
||||
|
||||
#define pm_notifier(fn, pri) { \
|
||||
static struct notifier_block fn##_nb = \
|
||||
@@ -462,6 +463,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void ksys_sync_helper(void) {}
|
||||
|
||||
#define pm_notifier(fn, pri) do { (void)(fn); } while (0)
|
||||
|
||||
static inline bool pm_wakeup_pending(void) { return false; }
|
||||
|
Reference in New Issue
Block a user