* [KJ] [PATCH] drivers/net/pcmcia/3c589_cs.c : Use of time_befor macro
@ 2005-07-08 18:39 Marcelo Feitoza Parisi
0 siblings, 0 replies; only message in thread
From: Marcelo Feitoza Parisi @ 2005-07-08 18:39 UTC (permalink / raw)
To: kernel-janitors
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>
--- linux/drivers/net/pcmcia/3c589_cs.c 2005-07-07 19:11:51.000000000 -0300
+++ linux-kj/drivers/net/pcmcia/3c589_cs.c 2005-07-07
22:59:40.020435184 -0300
@@ -39,6 +39,7 @@
#include <linux/if_arp.h>
#include <linux/ioport.h>
#include <linux/bitops.h>
+#include <linux/jiffies.h>
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
@@ -850,7 +851,7 @@
media = inw(ioaddr+WN4_MEDIA) & 0xc810;
/* Ignore collisions unless we've had no irq's recently */
- if (jiffies - lp->last_irq < HZ) {
+ if (time_before(jiffies, lp->last_irq + HZ)) {
media &= ~0x0010;
} else {
/* Try harder to detect carrier errors */
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-08 18:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 18:39 [KJ] [PATCH] drivers/net/pcmcia/3c589_cs.c : Use of time_befor macro Marcelo Feitoza Parisi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.