aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/dscc4.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-09-11 05:09:55 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-14 08:33:24 -0400
commit3173c8907ffb2c64456142da3df2bd0500bd59e0 (patch)
treedcd3700a2c37e24a2b5911bb5429aee715684926 /drivers/net/wan/dscc4.c
parent343c686c04eec556645f251f7d6c9b3d7335dae0 (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/wan/dscc4.c')
-rw-r--r--drivers/net/wan/dscc4.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 520a77a798e2..0c1ab4ac8bdb 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -542,8 +542,7 @@ static int dscc4_wait_ack_cec(struct dscc4_dev_priv *dpriv,
542 msg, i); 542 msg, i);
543 goto done; 543 goto done;
544 } 544 }
545 set_current_state(TASK_UNINTERRUPTIBLE); 545 schedule_timeout_uninterruptible(10);
546 schedule_timeout(10);
547 rmb(); 546 rmb();
548 } while (++i > 0); 547 } while (++i > 0);
549 printk(KERN_ERR "%s: %s timeout\n", dev->name, msg); 548 printk(KERN_ERR "%s: %s timeout\n", dev->name, msg);
@@ -588,8 +587,7 @@ static inline int dscc4_xpr_ack(struct dscc4_dev_priv *dpriv)
588 (dpriv->iqtx[cur] & Xpr)) 587 (dpriv->iqtx[cur] & Xpr))
589 break; 588 break;
590 smp_rmb(); 589 smp_rmb();
591 set_current_state(TASK_UNINTERRUPTIBLE); 590 schedule_timeout_uninterruptible(10);
592 schedule_timeout(10);
593 } while (++i > 0); 591 } while (++i > 0);
594 592
595 return (i >= 0 ) ? i : -EAGAIN; 593 return (i >= 0 ) ? i : -EAGAIN;
@@ -1035,8 +1033,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr)
1035 /* Flush posted writes */ 1033 /* Flush posted writes */
1036 readl(ioaddr + GSTAR); 1034 readl(ioaddr + GSTAR);
1037 1035
1038 set_current_state(TASK_UNINTERRUPTIBLE); 1036 schedule_timeout_uninterruptible(10);
1039 schedule_timeout(10);
1040 1037
1041 for (i = 0; i < 16; i++) 1038 for (i = 0; i < 16; i++)
1042 pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]); 1039 pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]);