lkml.org 
[lkml]   [2006]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] to make HID read block
Date
From
This patch makes a read of a HID device block until data is available.
Without it, the read goes into a busy-wait loop until data is available.

diff -rupN linux-2.6.16.16.orig/drivers/usb/input/hiddev.c
linux-2.6.16.16/drivers/usb/input/hiddev.c
--- linux-2.6.16.16.orig/drivers/usb/input/hiddev.c 2006-03-19
21:53:29.000000000 -0800
+++ linux-2.6.16.16/drivers/usb/input/hiddev.c 2006-05-12
16:39:08.000000000 -0700
@@ -318,6 +318,7 @@ static ssize_t hiddev_read(struct file *
}

schedule();
+ set_current_state(TASK_INTERRUPTIBLE);
}

set_current_state(TASK_RUNNING);


Signed-off-by: David Micon dmicon@pelco.com


Confidentiality Notice:

The information contained in this transmission is legally privileged and confidential, intended only for the use of the individual(s) or entities named above. This email and any files transmitted with it are the property of Pelco. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.

If you receive this communication in error, please notify us immediately by telephone call to +1-559-292-1981 or forward the e-mail to administrator@pelco.com and then permanently delete the e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.
-
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: 2006-05-16 02:19    [W:0.033 / U:2.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site