Subject: [patch 1/1] net/ltpc: replace schedule_timeout() with ssleep()/msleep()

From: [email-masked]
Date: Wed, 12 Jan 2005 00:08:40 +0100

Any comments would be appreciated.

Description: Use ssleep() / msleep() [as appropriate]
instead of schedule_timeout() to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <[email-masked]>
Acked-by: Arnaldo Carvalho de Melo <[email-masked]>
Signed-off-by: Maximilian Attems <[email-masked]>
Signed-off-by: Domen Puncer <[email-masked]>
---

 kj-domen/drivers/net/appletalk/ltpc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/net/appletalk/ltpc.c~msleep+ssleep-drivers_net_appletalk_ltpc drivers/net/appletalk/ltpc.c
--- kj/drivers/net/appletalk/ltpc.c~msleep+ssleep-drivers_net_appletalk_ltpc	2005-01-10 18:00:14.000000000 +0100
+++ kj-domen/drivers/net/appletalk/ltpc.c	2005-01-10 18:00:14.000000000 +0100
@@ -1109,8 +1109,7 @@ struct net_device * __init ltpc_probe(vo
 	inb_p(io+1);
 	inb_p(io+3);
 
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(2*HZ/100);
+	msleep(20);
 
 	inb_p(io+0);
 	inb_p(io+2);
@@ -1120,8 +1119,7 @@ struct net_device * __init ltpc_probe(vo
 	inb_p(io+5); /* enable dma */
 	inb_p(io+6); /* tri-state interrupt line */
 
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(HZ);
+	ssleep(1);
 	
 	/* now, figure out which dma channel we're using, unless it's
 	   already been specified */
_