lkml.org 
[lkml]   [2003]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 7/11] input: Fixes for the uinput userspace
Date
From
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input

===================================================================

ChangeSet@1.1365, 2003-06-21 04:43:13-07:00, neilb@cse.unsw.edu.au
input: Three fixes for the uinput userspace input device driver.


uinput.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

===================================================================

diff -Nru a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
--- a/drivers/input/misc/uinput.c Sat Jun 21 15:25:36 2003
+++ b/drivers/input/misc/uinput.c Sat Jun 21 15:25:36 2003
@@ -49,11 +49,11 @@

udev = (struct uinput_device *)dev->private;

- udev->head = (udev->head + 1) % UINPUT_BUFFER_SIZE;
udev->buff[udev->head].type = type;
udev->buff[udev->head].code = code;
udev->buff[udev->head].value = value;
do_gettimeofday(&udev->buff[udev->head].time);
+ udev->head = (udev->head + 1) % UINPUT_BUFFER_SIZE;

wake_up_interruptible(&udev->waitq);

@@ -82,6 +82,7 @@
udev->dev->event = uinput_dev_event;
udev->dev->upload_effect = uinput_dev_upload_effect;
udev->dev->erase_effect = uinput_dev_erase_effect;
+ udev->dev->private = udev;

init_waitqueue_head(&(udev->waitq));

@@ -264,7 +265,7 @@
return -ENODEV;

while ((udev->head != udev->tail) &&
- (retval + sizeof(struct uinput_device) <= count)) {
+ (retval + sizeof(struct input_event) <= count)) {
if (copy_to_user(buffer + retval, &(udev->buff[udev->tail]),
sizeof(struct input_event))) return -EFAULT;
udev->tail = (udev->tail + 1) % UINPUT_BUFFER_SIZE;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.028 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site