
From: domen@coderock.org

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: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/serial/crisv10.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/serial/crisv10.c~serial-crisv10-replace-schedule_timeout-with-msleep drivers/serial/crisv10.c
--- 25/drivers/serial/crisv10.c~serial-crisv10-replace-schedule_timeout-with-msleep	2005-03-07 00:34:58.000000000 -0800
+++ 25-akpm/drivers/serial/crisv10.c	2005-03-07 00:34:58.000000000 -0800
@@ -3757,10 +3757,8 @@ rs_write(struct tty_struct * tty, int fr
 		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 */
 
_
