Re: [PATCH] PCI fixes for 2.6.9

From: Greg KH
Date: Wed Oct 20 2004 - 01:42:11 EST


ChangeSet 1.1997.37.51, 2004/10/06 13:45:48-07:00, nacc@xxxxxxxxxx

[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 <nacc@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


drivers/pci/hotplug/cpqphp_ctrl.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)


diff -Nru a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
--- a/drivers/pci/hotplug/cpqphp_ctrl.c 2004-10-19 15:23:01 -07:00
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c 2004-10-19 15:23:01 -07:00
@@ -69,10 +69,8 @@
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);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/