netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: domen@coderock.org
To: acme@conectiva.com.br
Cc: netdev@oss.sgi.com, domen@coderock.org, nacc@us.ibm.com,
	janitor@sternwelten.at
Subject: [patch 1/1] net/ltpc: replace schedule_timeout() with ssleep()/msleep()
Date: Sat, 05 Mar 2005 16:47:25 +0100	[thread overview]
Message-ID: <20050305154726.66FDA1EE1E@trashy.coderock.org> (raw)





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

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 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-03-05 16:09:41.000000000 +0100
+++ kj-domen/drivers/net/appletalk/ltpc.c	2005-03-05 16:09:41.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 */
_

             reply	other threads:[~2005-03-05 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-05 15:47 domen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-11 23:08 [patch 1/1] net/ltpc: replace schedule_timeout() with ssleep()/msleep() domen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050305154726.66FDA1EE1E@trashy.coderock.org \
    --to=domen@coderock.org \
    --cc=acme@conectiva.com.br \
    --cc=janitor@sternwelten.at \
    --cc=nacc@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).