[PATCH] drivers/net: fix-up schedule_timeout() usage
Use schedule_timeout_interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
committed by
Jeff Garzik
parent
343c686c04
commit
3173c8907f
@@ -318,7 +318,7 @@ static void ibmtr_cleanup_card(struct net_device *dev)
|
||||
if (dev->base_addr) {
|
||||
outb(0,dev->base_addr+ADAPTRESET);
|
||||
|
||||
schedule_timeout(TR_RST_TIME); /* wait 50ms */
|
||||
schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */
|
||||
|
||||
outb(0,dev->base_addr+ADAPTRESETREL);
|
||||
}
|
||||
@@ -859,8 +859,7 @@ static int tok_init_card(struct net_device *dev)
|
||||
writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN);
|
||||
outb(0, PIOaddr + ADAPTRESET);
|
||||
|
||||
current->state=TASK_UNINTERRUPTIBLE;
|
||||
schedule_timeout(TR_RST_TIME); /* wait 50ms */
|
||||
schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */
|
||||
|
||||
outb(0, PIOaddr + ADAPTRESETREL);
|
||||
#ifdef ENABLE_PAGING
|
||||
@@ -908,8 +907,8 @@ static int tok_open(struct net_device *dev)
|
||||
DPRINTK("Adapter is up and running\n");
|
||||
return 0;
|
||||
}
|
||||
current->state=TASK_INTERRUPTIBLE;
|
||||
i=schedule_timeout(TR_RETRY_INTERVAL); /* wait 30 seconds */
|
||||
i=schedule_timeout_interruptible(TR_RETRY_INTERVAL);
|
||||
/* wait 30 seconds */
|
||||
if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */
|
||||
}
|
||||
outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/
|
||||
|
@@ -1101,7 +1101,7 @@ static int olympic_close(struct net_device *dev)
|
||||
|
||||
while(olympic_priv->srb_queued) {
|
||||
|
||||
t = schedule_timeout(60*HZ);
|
||||
t = schedule_timeout_interruptible(60*HZ);
|
||||
|
||||
if(signal_pending(current)) {
|
||||
printk(KERN_WARNING "%s: SRB timed out.\n",dev->name);
|
||||
|
@@ -1243,8 +1243,7 @@ void tms380tr_wait(unsigned long time)
|
||||
|
||||
tmp = jiffies + time/(1000000/HZ);
|
||||
do {
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
tmp = schedule_timeout(tmp);
|
||||
tmp = schedule_timeout_interruptible(tmp);
|
||||
} while(time_after(tmp, jiffies));
|
||||
#else
|
||||
udelay(time);
|
||||
|
Reference in New Issue
Block a user