diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2005-07-15 09:59:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-15 09:59:26 -0700 |
commit | a8178345c4f12f4413e5620fc86a6b0381c41bc9 (patch) | |
tree | dd9cb8c953556d539eabd4137032873a6578e988 /drivers/net/wan/sdla_x25.c | |
parent | 9d853c3757ef74ded5ae564d68370f22208fb88b (diff) |
[WAN]: drivers/net/wan/: use of time_after macro
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Use of the time_after() macro, defined at linux/jiffies.h, which deal
with wrapping correctly and are nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/sdla_x25.c')
-rw-r--r-- | drivers/net/wan/sdla_x25.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wan/sdla_x25.c b/drivers/net/wan/sdla_x25.c index 3a93d2fd4fb..8a95d61a2f8 100644 --- a/drivers/net/wan/sdla_x25.c +++ b/drivers/net/wan/sdla_x25.c @@ -91,6 +91,7 @@ #include <linux/wanrouter.h> /* WAN router definitions */ #include <linux/wanpipe.h> /* WANPIPE common user API definitions */ #include <linux/workqueue.h> +#include <linux/jiffies.h> /* time_after() macro */ #include <asm/byteorder.h> /* htons(), etc. */ #include <asm/atomic.h> #include <linux/delay.h> /* Experimental delay */ @@ -867,7 +868,7 @@ static int update(struct wan_device* wandev) if (!(card->u.x.timer_int_enabled & TMR_INT_ENABLED_UPDATE)){ break; } - if ((jiffies-timeout) > 1*HZ){ + if (time_after(jiffies, timeout + 1*HZ)){ card->u.x.timer_int_enabled &= ~TMR_INT_ENABLED_UPDATE; return -EAGAIN; } |