You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Suspend: Add config option to disable the freezer if architecture wants that
This patch makes the freezer optional for suspend to allow the system to work (or not work) like the original PMU suspend. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/suspend_ioctls.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/freezer.h>
|
||||
|
||||
struct swsusp_info {
|
||||
struct new_utsname uts;
|
||||
@@ -203,3 +204,24 @@ enum {
|
||||
#define TEST_MAX (__TEST_AFTER_LAST - 1)
|
||||
|
||||
extern int pm_test_level;
|
||||
|
||||
#ifdef CONFIG_SUSPEND_FREEZER
|
||||
static inline int suspend_freeze_processes(void)
|
||||
{
|
||||
return freeze_processes();
|
||||
}
|
||||
|
||||
static inline void suspend_thaw_processes(void)
|
||||
{
|
||||
thaw_processes();
|
||||
}
|
||||
#else
|
||||
static inline int suspend_freeze_processes(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void suspend_thaw_processes(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user