Commit 1b5e7ff2 authored by Domen Puncer's avatar Domen Puncer Committed by Linus Torvalds

[PATCH] message/mptbase: replace schedule_timeout() with ssleep()

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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent eb96b6e2
......@@ -3137,8 +3137,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1000 * HZ / 1000);
ssleep(1);
} else {
mdelay (1000);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment