Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100387
b: refs/heads/master
c: 8702965
h: refs/heads/master
i:
  100385: 633975e
  100383: 28cf387
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent e6f0fba commit e0e4f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f138e4814a9c28bc44d967a8effdd977ac00fc6e
refs/heads/master: 8702965848ed4bee27486a3e3d2ae34ebba6dd83
3 changes: 3 additions & 0 deletions trunk/drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/uinput.h>
#include <linux/smp_lock.h>

static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
Expand Down Expand Up @@ -222,13 +223,15 @@ static int uinput_open(struct inode *inode, struct file *file)
if (!newdev)
return -ENOMEM;

lock_kernel();
mutex_init(&newdev->mutex);
spin_lock_init(&newdev->requests_lock);
init_waitqueue_head(&newdev->requests_waitq);
init_waitqueue_head(&newdev->waitq);
newdev->state = UIST_NEW_DEVICE;

file->private_data = newdev;
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit e0e4f77

Please sign in to comment.