diff options
author | Kees Cook <keescook@chromium.org> | 2014-06-13 13:30:35 -0700 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-16 23:29:39 +0200 |
commit | a6e15a39048ec3229b9a53425f4384f55f6cc1b3 (patch) | |
tree | d1f8a005d2b6e85f781f2c9a4ba899614ec55ed8 /kernel/power/main.c | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) | |
download | linux-a6e15a39048ec3229b9a53425f4384f55f6cc1b3.tar.bz2 |
PM / hibernate: introduce "nohibernate" boot parameter
To support using kernel features that are not compatible with hibernation,
this creates the "nohibernate" kernel boot parameter to disable both
hibernation and resume. This allows hibernation support to be a boot-time
choice instead of only a compile-time choice.
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r-- | kernel/power/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index 573410d6647e..8e90f330f139 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -300,13 +300,11 @@ static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, s += sprintf(s,"%s ", pm_states[i].label); #endif -#ifdef CONFIG_HIBERNATION - s += sprintf(s, "%s\n", "disk"); -#else + if (hibernation_available()) + s += sprintf(s, "disk "); if (s != buf) /* convert the last space to a newline */ *(s-1) = '\n'; -#endif return (s - buf); } |