|
@@ -47,10 +47,9 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count,
|
|
char *report;
|
|
char *report;
|
|
DECLARE_WAITQUEUE(wait, current);
|
|
DECLARE_WAITQUEUE(wait, current);
|
|
|
|
|
|
- while (ret == 0) {
|
|
|
|
-
|
|
|
|
- mutex_lock(&list->read_mutex);
|
|
|
|
|
|
+ mutex_lock(&list->read_mutex);
|
|
|
|
|
|
|
|
+ while (ret == 0) {
|
|
if (list->head == list->tail) {
|
|
if (list->head == list->tail) {
|
|
add_wait_queue(&list->hidraw->wait, &wait);
|
|
add_wait_queue(&list->hidraw->wait, &wait);
|
|
set_current_state(TASK_INTERRUPTIBLE);
|
|
set_current_state(TASK_INTERRUPTIBLE);
|