isdn/icn: replace
PATCH 12/15 isdn/icn: replace
Any comments would be appreciated. This is a re-push of a patch submitted a few months ago which has not been merged as of 2.6.9-rc1-mm5 / 2.6.9-rc2.
Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.
Signed-off-by Nishanth Aravamudan <[email protected]>
drivers/isdn/icn/icn.c +6 -9
@@ -762,8 +762,7 @@ icn_check_loader(int cardnumber)#ifdef BOOT_DEBUG printk (KERN_DEBUG "Loader %d TO?\n" , cardnumber);#endif - current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (ICN_BOOT_TIMEOUT1 ); +msleep_interruptible (ICN_BOOT_TIMEOUT1 ); }else {#ifdef BOOT_DEBUG printk (KERN_DEBUG "Loader %d OK\n" , cardnumber);
@@ -788,8 +787,7 @@ icn_check_loader(int cardnumber)int slsec = sec; \printk (KERN_DEBUG "SLEEP(%d)\n" ,slsec); \while (slsec) { \ - current->state =TASK_INTERRUPTIBLE ; \ -schedule_timeout (HZ ); \ +msleep_interruptible (1000 ); \ slsec--; \ } \ }
@@ -950,7 +948,7 @@ icn_loadproto(u_char __user * buffer, icicn_maprelease_channel (card,0 );return -EIO ; } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (10 ); } }
@@ -974,8 +972,7 @@ icn_loadproto(u_char __user * buffer, ic#ifdef BOOT_DEBUG printk (KERN_DEBUG "Proto TO?\n" );#endif - current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (ICN_BOOT_TIMEOUT1 ); +msleep_interruptible (ICN_BOOT_TIMEOUT1 ); }else {if ((card->secondhalf) || (!card->doubleS0)) {#ifdef BOOT_DEBUG
@@ -1271,9 +1268,9 @@ icn_command(isdn_ctrl * c, icn_card * caif (!card->leased) { card->leased =1 ;while (card->ptype ==ISDN_PTYPE_UNKNOWN ) { -schedule_timeout (ICN_BOOT_TIMEOUT1 ); +msleep_interruptible (ICN_BOOT_TIMEOUT1 ); } -schedule_timeout (ICN_BOOT_TIMEOUT1 ); +msleep_interruptible (ICN_BOOT_TIMEOUT1 );sprintf (cbuf,"00;FV2ON\n01;EAZ%c\n02;EAZ%c\n" , (a &1 )?'1' :'C' , (a &2 )?'2' :'C' ); i =icn_writecmd (cbuf,strlen (cbuf),0 , card);
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors