radio/radio-sf16fmr2: replace schedule_timeout() with msleep()
PATCH 10/14 radio/radio-sf16fmr2: replace schedule_timeout() with msleep()
Quoted 3 lines · Mark Hollomon
since
sleep_delayis only called once (with the intent to sleep for 110 ms), wouldn't it be better to simply replace the call tosleep_delaywith msleep (and removesleep_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 <[email protected]>
Signed-off-by Maximilian Attems <[email protected]>
---
linux-2.6.9-rc1-bk7-max/drivers/media/radio/radio-sf16fmr2.c | 15 ----------- 1 files changed, 1 insertion(+), 14 deletions(-)
drivers/media/radio/radio-sf16fmr2.c renamed from drivers/media/radio/radio-sf16fmr2.c~msleep-drivers_media_radio-sf16fmr2 +1 -14
@@ -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_devifmr2_unmute (port);/* wait 0.11 sec */ -sleep_delay (110000LU ); +msleep (110 );/* NOTE if mute this stop radio you must set freq on unmute */
_