From c8c6801b60adfd44cded89bdb90602eac32237d6 Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Mon, 18 Oct 2004 18:22:53 -0700 Subject: [PATCH] [PATCH] ieee1394: replace schedule_timeout() with msleep_interruptible() Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ieee1394/nodemgr.c | 5 ++--- drivers/ieee1394/sbp2.c | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index cc9c999f9a8bc..2a9ff6f0229bf 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -70,8 +70,7 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length, if (!ret) break; - set_current_state(TASK_INTERRUPTIBLE); - if (schedule_timeout (HZ/3)) + if (msleep_interruptible(334)) return -EINTR; } @@ -1496,7 +1495,7 @@ static int nodemgr_host_thread(void *__hi) * to make sure things settle down. */ for (i = 0; i < 4 ; i++) { set_current_state(TASK_INTERRUPTIBLE); - if (schedule_timeout(HZ/16)) { + if (msleep_interruptible(63)) { up(&nodemgr_serialize); goto caught_signal; } diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 47de79f217970..935f0e1546d17 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -357,8 +357,7 @@ static int sbp2util_down_timeout(atomic_t *done, int timeout) int i; for (i = timeout; (i > 0 && atomic_read(done) == 0); i-= HZ/10) { - set_current_state(TASK_INTERRUPTIBLE); - if (schedule_timeout(HZ/10)) /* 100ms */ + if (msleep_interruptible(100)) /* 100ms */ return(1); } return ((i > 0) ? 0:1); -- 2.53.0