Commit b70bcb3f authored by Maximilian Attems's avatar Maximilian Attems Committed by Linus Torvalds

[PATCH] janitor: char/rio_linux: replace schedule_timeout() with msleep()/msleep_interruptible()

Use msleep()/msleep_interruptible() [as appropriate] instead of
schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dec91f5b
...@@ -330,8 +330,7 @@ int RIODelay (struct Port *PortP, int njiffies) ...@@ -330,8 +330,7 @@ int RIODelay (struct Port *PortP, int njiffies)
func_enter (); func_enter ();
rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies\n", njiffies); rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies\n", njiffies);
current->state = TASK_INTERRUPTIBLE; msleep_interruptible(jiffies_to_msecs(njiffies));
schedule_timeout(njiffies);
func_exit(); func_exit();
if (signal_pending(current)) if (signal_pending(current))
...@@ -347,8 +346,7 @@ int RIODelay_ni (struct Port *PortP, int njiffies) ...@@ -347,8 +346,7 @@ int RIODelay_ni (struct Port *PortP, int njiffies)
func_enter (); func_enter ();
rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies (ni)\n", njiffies); rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies (ni)\n", njiffies);
current->state = TASK_UNINTERRUPTIBLE; msleep(jiffies_to_msecs(njiffies));
schedule_timeout(njiffies);
func_exit(); func_exit();
return !RIO_FAIL; return !RIO_FAIL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment