I would appreciate any comments from the janitors list. This is one (of
many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_time);
with
msleep(jiffies_to_msecs(some_time));
msleep() is not exactly the same as the previous code, but I only did
this replacement where I thought long delays were *desired*. If this is
not the case here, then just disregard this patch.
Thanks,
Nish
Applys-to: 2.6.7
Description: Replace schedule_timeout() with msleep() to guarantee the
task delays for the desired time.
Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
--- linux-vanilla/drivers/isdn/sc/init.c 2004-06-16 05:19:43.000000000
+0000
+++ linux-dev/drivers/isdn/sc/init.c 2004-07-12 18:46:07.000000000 +0000
@@ -167,8 +167,7 @@ static int __init sc_init(void)
if(do_reset) {
pr_debug("Doing a SAFE probe reset\n");
outb(0xFF, io[b] + RESET_OFFSET);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(milliseconds(10000));
+ msleep(10000);
}
pr_debug("RAM Base for board %d is 0x%x, %s probe\n", b, ram[b],
ram[b] == 0 ? "will" : "won't");
@@ -500,8 +499,7 @@ int identify_board(unsigned long rambase
* Try to identify a PRI card
*/
outb(PRI_BASEPG_VAL, pgport);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ msleep(1000);
sig = readl(rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%x\n", sig);
if(sig == SIGNATURE)
@@ -511,8 +509,7 @@ int identify_board(unsigned long rambase
* Try to identify a PRI card
*/
outb(BRI_BASEPG_VAL, pgport);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ msleep(1000);
sig = readl(rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%x\n", sig);
if(sig == SIGNATURE)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
|