]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/power/main.c
Merge tag 'tty-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[mv-sheeva.git] / kernel / power / main.c
index 36e0f0903c3245e60d2994121d1aaa28c8fc0a23..9824b41e5a18cf5ecc5e57773b5ccc2195984c99 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2003 Patrick Mochel
  * Copyright (c) 2003 Open Source Development Lab
- * 
+ *
  * This file is released under the GPLv2
  *
  */
@@ -116,7 +116,7 @@ static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr,
        p = memchr(buf, '\n', n);
        len = p ? p - buf : n;
 
-       mutex_lock(&pm_mutex);
+       lock_system_sleep();
 
        level = TEST_FIRST;
        for (s = &pm_tests[level]; level <= TEST_MAX; s++, level++)
@@ -126,7 +126,7 @@ static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr,
                        break;
                }
 
-       mutex_unlock(&pm_mutex);
+       unlock_system_sleep();
 
        return error ? error : n;
 }
@@ -240,7 +240,7 @@ struct kobject *power_kobj;
  *     'standby' (Power-On Suspend), 'mem' (Suspend-to-RAM), and
  *     'disk' (Suspend-to-Disk).
  *
- *     store() accepts one of those strings, translates it into the 
+ *     store() accepts one of those strings, translates it into the
  *     proper enumerated value, and initiates a suspend transition.
  */
 static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr,
@@ -282,7 +282,7 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
        /* First, check if we are requested to hibernate */
        if (len == 4 && !strncmp(buf, "disk", len)) {
                error = hibernate();
-  goto Exit;
+               goto Exit;
        }
 
 #ifdef CONFIG_SUSPEND