public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: janitor@sternwelten.at
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, janitor@sternwelten.at
Subject: [patch 10/14]  radio/radio-sf16fmr2: 	replace	schedule_timeout() with msleep()
Date: Thu, 02 Sep 2004 01:16:33 +0200	[thread overview]
Message-ID: <E1C2eLB-0002qX-PK@sputnik> (raw)







On Tue, Jul 27, 2004 at 10:14:49AM -0400, Mark Hollomon wrote:
> since sleep_delay is only called once (with the intent to sleep for 110 
> ms), wouldn't it be better to simply replace the call to sleep_delay 
> with msleep (and remove sleep_delay)?

I wasn't sure if I should leave the function in, in case someone wanted
to modify the driver later. But, if you think it's ok, find this fix below.
Thanks again, Mark.

-Nish



Description: Replace single invocation of sleep_delay() with msleep() and
remove definition of sleep_delay().

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>



---

 linux-2.6.9-rc1-bk7-max/drivers/media/radio/radio-sf16fmr2.c |   15 -----------
 1 files changed, 1 insertion(+), 14 deletions(-)

diff -puN drivers/media/radio/radio-sf16fmr2.c~msleep-drivers_media_radio-sf16fmr2 drivers/media/radio/radio-sf16fmr2.c
--- linux-2.6.9-rc1-bk7/drivers/media/radio/radio-sf16fmr2.c~msleep-drivers_media_radio-sf16fmr2	2004-09-01 19:35:14.000000000 +0200
+++ linux-2.6.9-rc1-bk7-max/drivers/media/radio/radio-sf16fmr2.c	2004-09-01 19:35:14.000000000 +0200
@@ -55,19 +55,6 @@ static int radio_nr = -1;
 #define RSF16_MINFREQ 87*16000
 #define RSF16_MAXFREQ 108*16000
 
-/* from radio-aimslab */
-static void sleep_delay(unsigned long n)
-{
-	unsigned d=n/(1000000U/HZ);
-	if (!d)
-		udelay(n);
-	else
-	{
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(d);
-	}
-}
-
 static inline void wait(int n,int port)
 {
 	for (;n;--n) inb(port);
@@ -153,7 +140,7 @@ static int fmr2_setfreq(struct fmr2_devi
 	fmr2_unmute(port);
 
 	/* wait 0.11 sec */
-	sleep_delay(110000LU);
+	msleep(110);
 
 	/* NOTE if mute this stop radio
 	   you must set freq on unmute */

_

                 reply	other threads:[~2004-09-01 23:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1C2eLB-0002qX-PK@sputnik \
    --to=janitor@sternwelten.at \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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