diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2005-07-15 06:16:42 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-07-31 00:51:49 -0400 |
commit | cd8749b4aa6b7502e234d72cb53c00a3bc27ed1b (patch) | |
tree | 409a83008f86b569b40404b9996a8bc46194e3f6 /drivers/net/hamradio/mkiss.c | |
parent | 6b9b97ce70b789014515f808b1b64c8e29e300d1 (diff) |
[PATCH] Use time_before in hamradio drivers
Use of time_before() 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: Ralf Baechle DL5RB <ralf@linux-mips.org>
baycom_epp.c | 3 ++-
baycom_par.c | 3 ++-
baycom_ser_fdx.c | 3 ++-
baycom_ser_hdx.c | 3 ++-
mkiss.c | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/hamradio/mkiss.c')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 3035422f5ad..e94952e799f 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/etherdevice.h> | 46 | #include <linux/etherdevice.h> |
47 | #include <linux/skbuff.h> | 47 | #include <linux/skbuff.h> |
48 | #include <linux/if_arp.h> | 48 | #include <linux/if_arp.h> |
49 | #include <linux/jiffies.h> | ||
49 | 50 | ||
50 | #include <net/ax25.h> | 51 | #include <net/ax25.h> |
51 | 52 | ||
@@ -429,7 +430,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev) | |||
429 | * May be we must check transmitter timeout here ? | 430 | * May be we must check transmitter timeout here ? |
430 | * 14 Oct 1994 Dmitry Gorodchanin. | 431 | * 14 Oct 1994 Dmitry Gorodchanin. |
431 | */ | 432 | */ |
432 | if (jiffies - dev->trans_start < 20 * HZ) { | 433 | if (time_before(jiffies, dev->trans_start + 20 * HZ)) { |
433 | /* 20 sec timeout not reached */ | 434 | /* 20 sec timeout not reached */ |
434 | return 1; | 435 | return 1; |
435 | } | 436 | } |