From f8d61c26afb6b6a47f1a774e3f25ca7ea49b0053 Mon Sep 17 00:00:00 2001 From: Mike Chan Date: Tue, 27 Oct 2009 17:37:44 -0700 Subject: [PATCH] input: evdev: Use unique wakelock names wakelock names are now contain evdev->name and pid Signed-off-by: Mike Chan --- drivers/input/evdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index ae16b89c5004..eb938d2297ab 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -45,6 +45,7 @@ struct evdev_client { struct evdev *evdev; struct list_head node; struct wake_lock wake_lock; + char name[28]; }; static struct evdev *evdev_table[EVDEV_MINORS]; @@ -276,7 +277,9 @@ static int evdev_open(struct inode *inode, struct file *file) } spin_lock_init(&client->buffer_lock); - wake_lock_init(&client->wake_lock, WAKE_LOCK_SUSPEND, "evdev"); + snprintf(client->name, sizeof(client->name), "%s-%d", + dev_name(&evdev->dev), task_tgid_vnr(current)); + wake_lock_init(&client->wake_lock, WAKE_LOCK_SUSPEND, client->name); client->evdev = evdev; evdev_attach_client(evdev, client); -- 2.34.1