From: Mike Chan Date: Wed, 28 Oct 2009 00:37:44 +0000 (-0700) Subject: input: evdev: Use unique wakelock names X-Git-Tag: firefly_0821_release~9833^2~5^2~327 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ebdbe7c03e5f5634880c824f42dcded1337af762;p=firefly-linux-kernel-4.4.55.git input: evdev: Use unique wakelock names wakelock names are now contain evdev->name and pid Signed-off-by: Mike Chan --- diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 3a24ed442466..4d3e28103233 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -42,6 +42,7 @@ struct evdev_client { int tail; spinlock_t buffer_lock; /* protects access to buffer, head and tail */ struct wake_lock wake_lock; + char name[28]; struct fasync_struct *fasync; struct evdev *evdev; struct list_head node; @@ -298,7 +299,9 @@ static int evdev_open(struct inode *inode, struct file *file) client->bufsize = bufsize; 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);