]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/power/main.c
PM / hibernate: introduce "nohibernate" boot parameter
[mirror_ubuntu-artful-kernel.git] / kernel / power / main.c
index 573410d6647e2a374feca5f46146a5b0ab61cec7..8e90f330f1398277d1b41b0e94c99e71759e2665 100644 (file)
@@ -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);
 }