From 4b712030c9ac44294d9b423217982e04b1b46502 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sat, 30 Jul 2011 22:26:41 +0800 Subject: [PATCH] Revert "power: wakelock: Print active wakelocks when has_wake_lock() is called" This reverts commit 7175b7585f84bb8e7de5f6a1e694c3275377cecb. --- kernel/power/wakelock.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c index ca48bb8d316b..4b0e26065be0 100644 --- a/kernel/power/wakelock.c +++ b/kernel/power/wakelock.c @@ -208,23 +208,20 @@ static void expire_wake_lock(struct wake_lock *lock) /* Caller must acquire the list_lock spinlock */ static void print_active_locks(int type) { + unsigned long irqflags; struct wake_lock *lock; - bool print_expired = true; BUG_ON(type >= WAKE_LOCK_TYPE_COUNT); list_for_each_entry(lock, &active_wake_locks[type], link) { if (lock->flags & WAKE_LOCK_AUTO_EXPIRE) { long timeout = lock->expires - jiffies; - if (timeout > 0) + if (timeout <= 0) + pr_info("wake lock %s, expired\n", lock->name); + else pr_info("active wake lock %s, time left %ld\n", lock->name, timeout); - else if (print_expired) - pr_info("wake lock %s, expired\n", lock->name); - } else { + } else pr_info("active wake lock %s\n", lock->name); - if (!debug_mask & DEBUG_EXPIRE) - print_expired = false; - } } } @@ -253,8 +250,6 @@ 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) - print_active_locks(type); spin_unlock_irqrestore(&list_lock, irqflags); return ret; } -- 2.34.1