Commit 48d70552 authored by Micon, David's avatar Micon, David Committed by Linus Torvalds

[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: default avatarVojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9ccfc29c
...@@ -317,6 +317,7 @@ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t coun ...@@ -317,6 +317,7 @@ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t coun
} }
schedule(); schedule();
set_current_state(TASK_INTERRUPTIBLE);
} }
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment