Skip to contentSkip to conversation

char/rio_linux: replace

PATCH In review Nishanth Aravamudan 1 participant 1 message Sep 16, 2004

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

PATCH 20/33 char/rio_linux: replace

Any comments would be appreciated.

Description: Use msleep()/msleep_interruptible() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected.

drivers/char/rio/rio_linux.c +2 -4
@@ -330,8 +330,7 @@ int RIODelay (struct Port *PortP, int nj
   func_enter ();
 
   rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies\n", njiffies);  
-  current->state = TASK_INTERRUPTIBLE;
-  schedule_timeout(njiffies);
+  msleep_interruptible(jiffes_to_msecs(njiffies));
   func_exit();
 
   if (signal_pending(current))
@@ -347,8 +346,7 @@ int RIODelay_ni (struct Port *PortP, int
   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;
 }

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