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/wireless/prism54 | |
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/wireless/prism54')
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_mgt.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index 6f13d4a8e2d3..10cce514c15d 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -439,8 +439,7 @@ prism54_bring_down(islpci_private *priv) | |||
439 | wmb(); | 439 | wmb(); |
440 | 440 | ||
441 | /* wait a while for the device to reset */ | 441 | /* wait a while for the device to reset */ |
442 | set_current_state(TASK_UNINTERRUPTIBLE); | 442 | schedule_timeout_uninterruptible(msecs_to_jiffies(50)); |
443 | schedule_timeout(50*HZ/1000); | ||
444 | 443 | ||
445 | return 0; | 444 | return 0; |
446 | } | 445 | } |
@@ -491,8 +490,7 @@ islpci_reset_if(islpci_private *priv) | |||
491 | /* The software reset acknowledge needs about 220 msec here. | 490 | /* The software reset acknowledge needs about 220 msec here. |
492 | * Be conservative and wait for up to one second. */ | 491 | * Be conservative and wait for up to one second. */ |
493 | 492 | ||
494 | set_current_state(TASK_UNINTERRUPTIBLE); | 493 | remaining = schedule_timeout_uninterruptible(HZ); |
495 | remaining = schedule_timeout(HZ); | ||
496 | 494 | ||
497 | if(remaining > 0) { | 495 | if(remaining > 0) { |
498 | result = 0; | 496 | result = 0; |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index b6f2e5a223be..4937a5ad4b2c 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -455,7 +455,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
455 | struct islpci_mgmtframe **recvframe) | 455 | struct islpci_mgmtframe **recvframe) |
456 | { | 456 | { |
457 | islpci_private *priv = netdev_priv(ndev); | 457 | islpci_private *priv = netdev_priv(ndev); |
458 | const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000; | 458 | const long wait_cycle_jiffies = msecs_to_jiffies(ISL38XX_WAIT_CYCLE * 10); |
459 | long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; | 459 | long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; |
460 | int err; | 460 | int err; |
461 | DEFINE_WAIT(wait); | 461 | DEFINE_WAIT(wait); |
@@ -475,8 +475,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
475 | int timeleft; | 475 | int timeleft; |
476 | struct islpci_mgmtframe *frame; | 476 | struct islpci_mgmtframe *frame; |
477 | 477 | ||
478 | set_current_state(TASK_UNINTERRUPTIBLE); | 478 | timeleft = schedule_timeout_uninterruptible(wait_cycle_jiffies); |
479 | timeleft = schedule_timeout(wait_cycle_jiffies); | ||
480 | frame = xchg(&priv->mgmt_received, NULL); | 479 | frame = xchg(&priv->mgmt_received, NULL); |
481 | if (frame) { | 480 | if (frame) { |
482 | if (frame->header->oid == oid) { | 481 | if (frame->header->oid == oid) { |