]> git.hungrycats.org Git - linux/commitdiff
[PATCH] pci hotplug/cpqphp_ctrl: replace schedule_timeout() with msleep_interruptible()
authorNishanth Aravamudan <nacc@us.ibm.com>
Wed, 6 Oct 2004 06:45:48 +0000 (23:45 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 6 Oct 2004 06:45:48 +0000 (23:45 -0700)
Use msleep_interruptible() instead of schedule_timeout() to guarantee
the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/pci/hotplug/cpqphp_ctrl.c

index 7073a4aeb02506b1b243bcd3b09989e7021db8c9..10a5a7674a8acb8d3a0bc602a5ce2789a349538e 100644 (file)
@@ -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);
 }