diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-01-09 18:37:15 -0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:59:23 -0500 |
commit | ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d (patch) | |
tree | eca0d41b3eefc833238591e0100a8136f21269a7 /drivers/net/ppp_async.c | |
parent | e03d72b99e4027504ada134bf1804d6ea792b206 (diff) | |
download | op-kernel-dev-ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d.zip op-kernel-dev-ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d.tar.gz |
[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/ppp_async.c')
-rw-r--r-- | drivers/net/ppp_async.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index aa6540b..23659fd 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c @@ -30,6 +30,7 @@ #include <linux/ppp_channel.h> #include <linux/spinlock.h> #include <linux/init.h> +#include <linux/jiffies.h> #include <asm/uaccess.h> #include <asm/string.h> @@ -570,7 +571,7 @@ ppp_async_encode(struct asyncppp *ap) * character if necessary. */ if (islcp || flag_time == 0 - || jiffies - ap->last_xmit >= flag_time) + || time_after_eq(jiffies, ap->last_xmit + flag_time)) *buf++ = PPP_FLAG; ap->last_xmit = jiffies; fcs = PPP_INITFCS; |