Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Micon, David and committed by
Linus Torvalds
48d70552 9ccfc29c

+1
+1
drivers/usb/input/hiddev.c
··· 317 317 } 318 318 319 319 schedule(); 320 + set_current_state(TASK_INTERRUPTIBLE); 320 321 } 321 322 322 323 set_current_state(TASK_RUNNING);