* [Kernel-janitors] [PATCH 2.6.9-rc2 5/9] usb/hid-core: add
@ 2004-09-27 21:52 Nishanth Aravamudan
0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2004-09-27 21:52 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
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.
--- 2.6.9-rc2-vanilla/drivers/usb/input/hid-core.c 2004-09-13 17:15:54.000000000 -0700
+++ 2.6.9-rc2/drivers/usb/input/hid-core.c 2004-09-27 14:50:24.000000000 -0700
@@ -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);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-27 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27 21:52 [Kernel-janitors] [PATCH 2.6.9-rc2 5/9] usb/hid-core: add Nishanth Aravamudan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.