Commit 2fd06db3 authored by Domen Puncer's avatar Domen Puncer Committed by Linus Torvalds

[PATCH] serial/crisv10: replace schedule_timeout() with msleep()

Use msleep() instead of schedule_timeout() to guarantee the task delays as
expected.  The current code uses TASK_INTERRUPTIBLE, but does not care
about signals, so I believe msleep() should be ok.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Acked-by: default avatarMikael Starvik <starvik@axis.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a8fbbeb8
......@@ -3757,10 +3757,8 @@ rs_write(struct tty_struct * tty, int from_user,
e100_enable_rx_irq(info);
#endif
if (info->rs485.delay_rts_before_send > 0) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout((info->rs485.delay_rts_before_send * HZ)/1000);
}
if (info->rs485.delay_rts_before_send > 0)
msleep(info->rs485.delay_rts_before_send);
}
#endif /* CONFIG_ETRAX_RS485 */
......
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