[patch 11/14] message/mptbase: replace schedule_timeout() with ssleep()

From: domen
Date: Sun Mar 06 2005 - 18:55:11 EST




Use ssleep() instead of schedule_timeout() to guarantee
the task delays as expected. The original code does use TASK_INTERRUPTIBLE, but
does not check for signals or early return from schedule_timeout() so ssleep()
seems more appropriate.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Signed-off-by: Domen Puncer <domen@xxxxxxxxxxxx>
---


kj-domen/drivers/message/fusion/mptbase.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/message/fusion/mptbase.c~ssleep-drivers_message_fusion_mptbase drivers/message/fusion/mptbase.c
--- kj/drivers/message/fusion/mptbase.c~ssleep-drivers_message_fusion_mptbase 2005-03-05 16:11:15.000000000 +0100
+++ kj-domen/drivers/message/fusion/mptbase.c 2005-03-05 16:11:15.000000000 +0100
@@ -3137,8 +3137,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign

/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1000 * HZ / 1000);
+ ssleep(1);
} else {
mdelay (1000);
}
_
-
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/