tree 81d8d6480b02756197620d16802f88a1863ec932
parent 1ac2854cbc637de7e958cfa8d153ccf9e6668dda
author Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:03:15 
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:57:46 -0700

[PATCH] dvb: ttusb-budget: use time_after_eq()

Use of the time_after_eq() macro, defined at linux/jiffies.h, which deal
with wrapping correctly and are nicer to read.

Signed-off-by: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Signed-off-by: Johannes Stezenbach <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/time.h>
 #include <linux/errno.h>
+#include <linux/jiffies.h>
 #include <asm/semaphore.h>
 #include "dvb_frontend.h"
@@ -570,7 +571,8 @@ static void ttusb_handle_sec_data(struct
                                  const u8 * data, int len);
-static int numpkt = 0, lastj, numts, numstuff, numsec, numinvalid;
+static int numpkt = 0, numts, numstuff, numsec, numinvalid;
+static unsigned long lastj;
 static void ttusb_process_muxpack(struct ttusb *ttusb, const u8 * muxpack,
                           int len)
@@ -779,7 +781,7 @@ static void ttusb_iso_irq(struct urb *ur
                        u8 *data;
                        int len;
-                       if ((jiffies - lastj) >= HZ) {
+                       if (time_after_eq(jiffies, lastj + HZ)) {
 #if DEBUG > 2
                                    ("frames/s: %d (ts: %d, stuff %d, sec: %d, 
invalid: %d, all: %d)\n",
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to