summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorMike Chan <mike@android.com>2011-10-09 02:16:12 +0100
committerAndy Green <andy.green@linaro.org>2011-10-09 02:16:12 +0100
commit079b0380e699d8cc4517f4f2c4b7c2fe7ca7306a (patch)
tree0ce589689959f7c493ad4a9904d86b80293fa954 /drivers/input
parent1791f6eed6f128b28b44ceb460bef573df91bbed (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);