diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:49:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:49:19 -0400 |
commit | 9c8680e2cfbb60d5075f8caaf9d98276120bcc78 (patch) | |
tree | 1957cff26a46271d5b63a3c209629ddd7f9fe124 /drivers/input/misc/uinput.c | |
parent | f900e5824a44ab65437b4f7e7c610b72f94820c5 (diff) | |
parent | b9ec4e109d7a342e83e1210e05797222e36555c3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (26 commits)
Input: add support for Braille devices
Input: synaptics - limit rate to 40pps on Toshiba Protege M300
Input: gamecon - add SNES mouse support
Input: make modalias code respect allowed buffer size
Input: convert /proc handling to seq_file
Input: limit attributes' output to PAGE_SIZE
Input: gameport - fix memory leak
Input: serio - fix memory leak
Input: zaurus keyboard driver updates
Input: i8042 - fix logic around pnp_register_driver()
Input: ns558 - fix logic around pnp_register_driver()
Input: pcspkr - separate device and driver registration
Input: atkbd - allow disabling on X86_PC (if EMBEDDED)
Input: atkbd - disable softrepeat for dumb keyboards
Input: atkbd - fix complaints about 'releasing unknown key 0x7f'
Input: HID - fix duplicate key mapping for Logitech UltraX remote
Input: use kzalloc() throughout the code
Input: fix input_free_device() implementation
Input: initialize serio and gameport at subsystem level
Input: uinput - semaphore to mutex conversion
...
Diffstat (limited to 'drivers/input/misc/uinput.c')
-rw-r--r-- | drivers/input/misc/uinput.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 546ed9b4901d..d723e9ad7c41 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -194,7 +194,7 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
194 | if (!newdev) | 194 | if (!newdev) |
195 | return -ENOMEM; | 195 | return -ENOMEM; |
196 | 196 | ||
197 | init_MUTEX(&newdev->sem); | 197 | mutex_init(&newdev->mutex); |
198 | spin_lock_init(&newdev->requests_lock); | 198 | spin_lock_init(&newdev->requests_lock); |
199 | init_waitqueue_head(&newdev->requests_waitq); | 199 | init_waitqueue_head(&newdev->requests_waitq); |
200 | init_waitqueue_head(&newdev->waitq); | 200 | init_waitqueue_head(&newdev->waitq); |
@@ -340,7 +340,7 @@ static ssize_t uinput_write(struct file *file, const char __user *buffer, size_t | |||
340 | struct uinput_device *udev = file->private_data; | 340 | struct uinput_device *udev = file->private_data; |
341 | int retval; | 341 | int retval; |
342 | 342 | ||
343 | retval = down_interruptible(&udev->sem); | 343 | retval = mutex_lock_interruptible(&udev->mutex); |
344 | if (retval) | 344 | if (retval) |
345 | return retval; | 345 | return retval; |
346 | 346 | ||
@@ -348,7 +348,7 @@ static ssize_t uinput_write(struct file *file, const char __user *buffer, size_t | |||
348 | uinput_inject_event(udev, buffer, count) : | 348 | uinput_inject_event(udev, buffer, count) : |
349 | uinput_setup_device(udev, buffer, count); | 349 | uinput_setup_device(udev, buffer, count); |
350 | 350 | ||
351 | up(&udev->sem); | 351 | mutex_unlock(&udev->mutex); |
352 | 352 | ||
353 | return retval; | 353 | return retval; |
354 | } | 354 | } |
@@ -369,7 +369,7 @@ static ssize_t uinput_read(struct file *file, char __user *buffer, size_t count, | |||
369 | if (retval) | 369 | if (retval) |
370 | return retval; | 370 | return retval; |
371 | 371 | ||
372 | retval = down_interruptible(&udev->sem); | 372 | retval = mutex_lock_interruptible(&udev->mutex); |
373 | if (retval) | 373 | if (retval) |
374 | return retval; | 374 | return retval; |
375 | 375 | ||
@@ -388,7 +388,7 @@ static ssize_t uinput_read(struct file *file, char __user *buffer, size_t count, | |||
388 | } | 388 | } |
389 | 389 | ||
390 | out: | 390 | out: |
391 | up(&udev->sem); | 391 | mutex_unlock(&udev->mutex); |
392 | 392 | ||
393 | return retval; | 393 | return retval; |
394 | } | 394 | } |
@@ -439,7 +439,7 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
439 | 439 | ||
440 | udev = file->private_data; | 440 | udev = file->private_data; |
441 | 441 | ||
442 | retval = down_interruptible(&udev->sem); | 442 | retval = mutex_lock_interruptible(&udev->mutex); |
443 | if (retval) | 443 | if (retval) |
444 | return retval; | 444 | return retval; |
445 | 445 | ||
@@ -589,7 +589,7 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
589 | } | 589 | } |
590 | 590 | ||
591 | out: | 591 | out: |
592 | up(&udev->sem); | 592 | mutex_unlock(&udev->mutex); |
593 | return retval; | 593 | return retval; |
594 | } | 594 | } |
595 | 595 | ||