[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
@@ -542,8 +542,7 @@ static int dscc4_wait_ack_cec(struct dscc4_dev_priv *dpriv,
|
||||
msg, i);
|
||||
goto done;
|
||||
}
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(10);
|
||||
schedule_timeout_uninterruptible(10);
|
||||
rmb();
|
||||
} while (++i > 0);
|
||||
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)
|
||||
(dpriv->iqtx[cur] & Xpr))
|
||||
break;
|
||||
smp_rmb();
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(10);
|
||||
schedule_timeout_uninterruptible(10);
|
||||
} while (++i > 0);
|
||||
|
||||
return (i >= 0 ) ? i : -EAGAIN;
|
||||
@@ -1035,8 +1033,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr)
|
||||
/* Flush posted writes */
|
||||
readl(ioaddr + GSTAR);
|
||||
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(10);
|
||||
schedule_timeout_uninterruptible(10);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]);
|
||||
|
Reference in New Issue
Block a user