diff options
author | Micon, David <DMicon@pelco.com> | 2006-05-20 14:59:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-21 12:59:17 -0700 |
commit | 48d705522da4fa04bb0169a7ca3c9ab92e28b613 (patch) | |
tree | 4863bac913553850e33a0cfc8f8dabd598214bf7 | |
parent | 9ccfc29c671c9d0a83c2a114d4bc5f85f3cd749d (diff) | |
download | kernel_samsung_aries-48d705522da4fa04bb0169a7ca3c9ab92e28b613.zip kernel_samsung_aries-48d705522da4fa04bb0169a7ca3c9ab92e28b613.tar.gz kernel_samsung_aries-48d705522da4fa04bb0169a7ca3c9ab92e28b613.tar.bz2 |
[PATCH] HID read busywait fix
Make 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.
Cc: Greg KH <greg@kroah.com>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/usb/input/hiddev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c index 6dd6666..c4670e1 100644 --- a/drivers/usb/input/hiddev.c +++ b/drivers/usb/input/hiddev.c @@ -317,6 +317,7 @@ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t coun } schedule(); + set_current_state(TASK_INTERRUPTIBLE); } set_current_state(TASK_RUNNING); |