[PATCH 03/14] USB speedtouch: replace yield()

From: Duncan Sands (baldrick@wanadoo.fr)
Date: Tue May 20 2003 - 17:54:49 EST


Use set_current_state (TASK_RUNNING); schedule(); instead.

 speedtch.c | 6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -Nru a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c
--- a/drivers/usb/misc/speedtch.c Wed May 21 00:40:05 2003
+++ b/drivers/usb/misc/speedtch.c Wed May 21 00:40:05 2003
@@ -1298,7 +1298,8 @@
                 if (completed == count)
                         break;
 
- yield ();
+ set_current_state (TASK_RUNNING);
+ schedule ();
         } while (1);
 
         dbg ("udsl_usb_disconnect: flushing");
@@ -1337,7 +1338,8 @@
                 if (count == UDSL_NUM_SND_URBS)
                         break;
 
- yield ();
+ set_current_state (TASK_RUNNING);
+ schedule ();
         } while (1);
 
         dbg ("udsl_usb_disconnect: flushing");

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:42 EST