Add set_current_state() before schedule_timeout() so a delay is achieved.
Without the addition, schedule_timeout() returns immediately.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
interface is in a clean state. */
while ((to_clean->curr_msg) || (to_clean->si_state != SI_NORMAL)) {
poll(to_clean);
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}