]> git.hungrycats.org Git - linux/commitdiff
[PATCH] janitor: char/rio_linux: replace schedule_timeout() with msleep()/msleep_inte...
authorMaximilian Attems <janitor@sternwelten.at>
Tue, 19 Oct 2004 01:19:34 +0000 (18:19 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:19:34 +0000 (18:19 -0700)
Use msleep()/msleep_interruptible() [as appropriate] instead of
schedule_timeout() to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/rio/rio_linux.c

index 0cc02371a845f57c612c78a2ac432ea7bcf09d3d..a8f443e1461c784f235c560ebfc7fdb76117af8f 100644 (file)
@@ -330,8 +330,7 @@ int RIODelay (struct Port *PortP, int njiffies)
   func_enter ();
 
   rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies\n", njiffies);  
-  current->state = TASK_INTERRUPTIBLE;
-  schedule_timeout(njiffies);
+  msleep_interruptible(jiffies_to_msecs(njiffies));
   func_exit();
 
   if (signal_pending(current))
@@ -347,8 +346,7 @@ int RIODelay_ni (struct Port *PortP, int njiffies)
   func_enter ();
 
   rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies (ni)\n", njiffies);  
-  current->state = TASK_UNINTERRUPTIBLE;
-  schedule_timeout(njiffies);
+  msleep(jiffies_to_msecs(njiffies));
   func_exit();
   return !RIO_FAIL;
 }