Commit d7ef45b0 authored by Shani's avatar Shani Committed by Jeff Garzik

Patch:replace with time_after in drivers/net/eexpress.c

Replacing with time_after in drivers/net/eexpress.c
Applies and compiles clean on latest tree.Not tested.
Signed-off-by: default avatarShani Moideen <shani.moideen@wipro.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent acbddb59
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
#include <linux/mca-legacy.h> #include <linux/mca-legacy.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/jiffies.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -556,7 +557,7 @@ static void unstick_cu(struct net_device *dev) ...@@ -556,7 +557,7 @@ static void unstick_cu(struct net_device *dev)
if (lp->started) if (lp->started)
{ {
if ((jiffies - dev->trans_start)>50) if (time_after(jiffies, dev->trans_start + 50))
{ {
if (lp->tx_link==lp->last_tx_restart) if (lp->tx_link==lp->last_tx_restart)
{ {
...@@ -612,7 +613,7 @@ static void unstick_cu(struct net_device *dev) ...@@ -612,7 +613,7 @@ static void unstick_cu(struct net_device *dev)
} }
else else
{ {
if ((jiffies-lp->init_time)>10) if (time_after(jiffies, lp->init_time + 10))
{ {
unsigned short status = scb_status(dev); unsigned short status = scb_status(dev);
printk(KERN_WARNING "%s: i82586 startup timed out, status %04x, resetting...\n", printk(KERN_WARNING "%s: i82586 startup timed out, status %04x, resetting...\n",
...@@ -1649,7 +1650,7 @@ eexp_set_multicast(struct net_device *dev) ...@@ -1649,7 +1650,7 @@ eexp_set_multicast(struct net_device *dev)
#endif #endif
oj = jiffies; oj = jiffies;
while ((SCB_CUstat(scb_status(dev)) == 2) && while ((SCB_CUstat(scb_status(dev)) == 2) &&
((jiffies-oj) < 2000)); (time_after(jiffies, oj + 2000)));
if (SCB_CUstat(scb_status(dev)) == 2) if (SCB_CUstat(scb_status(dev)) == 2)
printk("%s: warning, CU didn't stop\n", dev->name); printk("%s: warning, CU didn't stop\n", dev->name);
lp->started &= ~(STARTED_CU); lp->started &= ~(STARTED_CU);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment