Skip to content

Commit

Permalink
uinput: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent f138e48 commit 8702965
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 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 8702965

Please sign in to comment.