[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>
This commit is contained in:

committed by
Jeff Garzik

parent
6b9b97ce70
commit
cd8749b4aa
@@ -46,6 +46,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <net/ax25.h>
|
||||
|
||||
@@ -429,7 +430,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
* May be we must check transmitter timeout here ?
|
||||
* 14 Oct 1994 Dmitry Gorodchanin.
|
||||
*/
|
||||
if (jiffies - dev->trans_start < 20 * HZ) {
|
||||
if (time_before(jiffies, dev->trans_start + 20 * HZ)) {
|
||||
/* 20 sec timeout not reached */
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user