From 43700f033d587c126ffe009918f8a6ed25e43b78 Mon Sep 17 00:00:00 2001 From: Anurag Singh Date: Tue, 19 Mar 2013 17:14:21 -0700 Subject: input: evdev: Move wake_lock_destroy call Calling wake_lock_destroy from inside a spinlock protected region (or, in general, from atomic context) leads to a 'scheduling while atomic bug' because the internal wakeup source deletion logic calls synchronize_rcu, which can sleep. Moreover, since the interal lists are already protected with RCUs and spinlocks, putting the wake_lock_destroy call in a spinlock is redundant. Change-Id: I10a2239b664a5f43e54495f24fe588fb09282305 Signed-off-by: Anurag Singh --- drivers/input/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/evdev.c') diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 878b10402..66dd70696 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -751,8 +751,8 @@ static int evdev_disable_suspend_block(struct evdev *evdev, spin_lock_irq(&client->buffer_lock); client->use_wake_lock = false; - wake_lock_destroy(&client->wake_lock); spin_unlock_irq(&client->buffer_lock); + wake_lock_destroy(&client->wake_lock); return 0; } -- cgit v1.2.3