From b70bcb3f75d2f2051546099ccd627c69d8370588 Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Mon, 18 Oct 2004 18:19:34 -0700 Subject: [PATCH] [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: Nishanth Aravamudan Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/rio/rio_linux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 0cc02371a845f..a8f443e1461c7 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c @@ -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; } -- 2.53.0