aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet/arcnet.c
diff options
context:
space:
mode:
authorMarcelo Feitoza Parisi <marcelo@feitoza.com.br>2006-01-09 21:37:15 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:59:23 -0500
commitff5688ae1cedfb175b5ed0f319d03ad2e5ee005d (patch)
treeeca0d41b3eefc833238591e0100a8136f21269a7 /drivers/net/arcnet/arcnet.c
parente03d72b99e4027504ada134bf1804d6ea792b206 (diff)
[PATCH] drivers/net/*: use time_after() and friends
They deal with wrapping correctly and are nicer to read. Also make jiffies-holding variables unsigned long. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/arcnet/arcnet.c')
-rw-r--r--drivers/net/arcnet/arcnet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index 12ef52c193a3..409d61d8d083 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -52,6 +52,7 @@
52#include <net/arp.h> 52#include <net/arp.h>
53#include <linux/init.h> 53#include <linux/init.h>
54#include <linux/arcdevice.h> 54#include <linux/arcdevice.h>
55#include <linux/jiffies.h>
55 56
56/* "do nothing" functions for protocol drivers */ 57/* "do nothing" functions for protocol drivers */
57static void null_rx(struct net_device *dev, int bufnum, 58static void null_rx(struct net_device *dev, int bufnum,
@@ -733,7 +734,7 @@ static void arcnet_timeout(struct net_device *dev)
733 734
734 spin_unlock_irqrestore(&lp->lock, flags); 735 spin_unlock_irqrestore(&lp->lock, flags);
735 736
736 if (jiffies - lp->last_timeout > 10*HZ) { 737 if (time_after(jiffies, lp->last_timeout + 10*HZ)) {
737 BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n", 738 BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n",
738 msg, status, lp->intmask, lp->lasttrans_dest); 739 msg, status, lp->intmask, lp->lasttrans_dest);
739 lp->last_timeout = jiffies; 740 lp->last_timeout = jiffies;