diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-11 05:09:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:33:24 -0400 |
commit | 3173c8907ffb2c64456142da3df2bd0500bd59e0 (patch) | |
tree | dcd3700a2c37e24a2b5911bb5429aee715684926 /drivers/net/tokenring/ibmtr.c | |
parent | 343c686c04eec556645f251f7d6c9b3d7335dae0 (diff) |
[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>
Diffstat (limited to 'drivers/net/tokenring/ibmtr.c')
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index e7b001017b9a..8154bbbb7792 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -318,7 +318,7 @@ static void ibmtr_cleanup_card(struct net_device *dev) | |||
318 | if (dev->base_addr) { | 318 | if (dev->base_addr) { |
319 | outb(0,dev->base_addr+ADAPTRESET); | 319 | outb(0,dev->base_addr+ADAPTRESET); |
320 | 320 | ||
321 | schedule_timeout(TR_RST_TIME); /* wait 50ms */ | 321 | schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */ |
322 | 322 | ||
323 | outb(0,dev->base_addr+ADAPTRESETREL); | 323 | outb(0,dev->base_addr+ADAPTRESETREL); |
324 | } | 324 | } |
@@ -859,8 +859,7 @@ static int tok_init_card(struct net_device *dev) | |||
859 | writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN); | 859 | writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN); |
860 | outb(0, PIOaddr + ADAPTRESET); | 860 | outb(0, PIOaddr + ADAPTRESET); |
861 | 861 | ||
862 | current->state=TASK_UNINTERRUPTIBLE; | 862 | schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */ |
863 | schedule_timeout(TR_RST_TIME); /* wait 50ms */ | ||
864 | 863 | ||
865 | outb(0, PIOaddr + ADAPTRESETREL); | 864 | outb(0, PIOaddr + ADAPTRESETREL); |
866 | #ifdef ENABLE_PAGING | 865 | #ifdef ENABLE_PAGING |
@@ -908,8 +907,8 @@ static int tok_open(struct net_device *dev) | |||
908 | DPRINTK("Adapter is up and running\n"); | 907 | DPRINTK("Adapter is up and running\n"); |
909 | return 0; | 908 | return 0; |
910 | } | 909 | } |
911 | current->state=TASK_INTERRUPTIBLE; | 910 | i=schedule_timeout_interruptible(TR_RETRY_INTERVAL); |
912 | i=schedule_timeout(TR_RETRY_INTERVAL); /* wait 30 seconds */ | 911 | /* wait 30 seconds */ |
913 | if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */ | 912 | if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */ |
914 | } | 913 | } |
915 | outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/ | 914 | outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/ |