From a591e948608a48c13a3b857591d41a01ef4e735d Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Tue, 5 Oct 2004 23:45:48 -0700 Subject: [PATCH] [PATCH] pci hotplug/cpqphp_ctrl: replace schedule_timeout() with msleep_interruptible() Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/cpqphp_ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 7073a4aeb0250..10a5a7674a8ac 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c @@ -69,10 +69,8 @@ static void long_delay(int delay) init_waitqueue_head(&delay_wait); add_wait_queue(&delay_wait, &wait); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(delay); + msleep_interruptible(jiffies_to_msecs(delay)); remove_wait_queue(&delay_wait, &wait); - set_current_state(TASK_RUNNING); up(&delay_sem); } -- 2.53.0