Skip to contentSkip to conversation

usb/hid-core: add

PATCH New Nishanth Aravamudan 1 participant 1 message Sep 27, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/9 usb/hid-core: add

Any comments would be appreciated.

Description: Add set_current_state() before schedule_timeout() so that the task delays as expected. Without the addition, schedule_timeout() will return immediately on subsequent iterations of the while-loop.

drivers/usb/input/hid-core.c +3 -1
@@ -1244,8 +1244,10 @@ int hid_wait_io(struct hid_device *hid)
 	add_wait_queue(&hid->wait, &wait);
 
 	while (timeout && (test_bit(HID_CTRL_RUNNING, &hid->iofl) ||
-			   test_bit(HID_OUT_RUNNING, &hid->iofl)))
+			   test_bit(HID_OUT_RUNNING, &hid->iofl))) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
 		timeout = schedule_timeout(timeout);
+	}
 
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&hid->wait, &wait);

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors