PM: wakelocks: Display wakelocks preventing suspend by default
authorTodd Poynor <toddpoynor@google.com>
Mon, 8 Aug 2011 23:06:54 +0000 (16:06 -0700)
committerTodd Poynor <toddpoynor@google.com>
Wed, 10 Aug 2011 23:14:56 +0000 (16:14 -0700)
Use DEBUG_WAKEUP flag to show wakelocks that abort suspend, in
addition to showing wakelocks held during system resume.
DEBUG_WAKEUP is enabled by default.

Change-Id: If6fa68e8afbc482a5300ffab2964694b02b34f41
Signed-off-by: Todd Poynor <toddpoynor@google.com>
kernel/power/wakelock.c

index d45df2b151b7acd657588ee49839a3a64dfc9d83..2ee459fe44560a1937b4548da652a94d08958670 100644 (file)
@@ -249,7 +249,7 @@ long has_wake_lock(int type)
        unsigned long irqflags;
        spin_lock_irqsave(&list_lock, irqflags);
        ret = has_wake_lock_locked(type);
-       if (ret && (debug_mask & DEBUG_SUSPEND) && type == WAKE_LOCK_SUSPEND)
+       if (ret && (debug_mask & DEBUG_WAKEUP) && type == WAKE_LOCK_SUSPEND)
                print_active_locks(type);
        spin_unlock_irqrestore(&list_lock, irqflags);
        return ret;