Revert "PM: wakelock: Abort task freezing if a wake lock is held."
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 15:02:33 +0000 (23:02 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 15:02:33 +0000 (23:02 +0800)
This reverts commit 9a4999395d8b46f7005f9d1d61e0ef922b7cf49f.

kernel/power/process.c

index 7b85cba64e6219b6439e1e46fdb245153fcf5135..cc2e55373b68cc3f32e83fbf036200c30a14f343 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/module.h>
 #include <linux/syscalls.h>
 #include <linux/freezer.h>
-#include <linux/wakelock.h>
 
 /* 
  * Timeout for stopping processes
@@ -38,7 +37,6 @@ static int try_to_freeze_tasks(bool sig_only)
        struct timeval start, end;
        u64 elapsed_csecs64;
        unsigned int elapsed_csecs;
-       unsigned int wakeup = 0;
 
        do_gettimeofday(&start);
 
@@ -65,10 +63,6 @@ static int try_to_freeze_tasks(bool sig_only)
                } while_each_thread(g, p);
                read_unlock(&tasklist_lock);
                yield();                        /* Yield is okay here */
-               if (todo && has_wake_lock(WAKE_LOCK_SUSPEND)) {
-                       wakeup = 1;
-                       break;
-               }
                if (time_after(jiffies, end_time))
                        break;
        } while (todo);
@@ -84,18 +78,11 @@ static int try_to_freeze_tasks(bool sig_only)
                 * and caller must call thaw_processes() if something fails),
                 * but it cleans up leftover PF_FREEZE requests.
                 */
-               if(wakeup) {
-                       printk("\n");
-                       printk(KERN_ERR "Freezing of %s aborted\n",
-                                       sig_only ? "user space " : "tasks ");
-               }
-               else {
-                       printk("\n");
-                       printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
-                                       "(%d tasks refusing to freeze):\n",
-                                       elapsed_csecs / 100, elapsed_csecs % 100, todo);
-                       show_state();
-               }
+               printk("\n");
+               printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
+                               "(%d tasks refusing to freeze):\n",
+                               elapsed_csecs / 100, elapsed_csecs % 100, todo);
+               show_state();
                read_lock(&tasklist_lock);
                do_each_thread(g, p) {
                        task_lock(p);