aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorMike Chan <mike@android.com>2011-12-13 01:19:21 +0800
committerAndy Green <andy.green@linaro.org>2012-01-09 10:46:01 +0800
commit741ee0327c84f76f53f617a89f979737303cfa4e (patch)
treedd0ebc3302856e5b68a7f18b78f6fd3c15d92ba8 /drivers/input
parent425be5c1a372f7cb9300fbaa17623252a2d55fed (diff)
input: evdev: Use unique wakelock names
wakelock names are now contain evdev->name and pid Signed-off-by: Mike Chan <mike@android.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/evdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 033b6c833e4..7b96bd070b7 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -45,6 +45,7 @@ struct evdev_client {
unsigned int packet_head; /* [future] position of the first element of next packet */
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;
@@ -313,7 +314,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);