diff options
author | Johannes Stezenbach <devnull@localhost> | 2005-08-02 22:44:20 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2005-08-02 22:44:20 +0000 |
commit | bae40438ad428bc7d0305110c1598834d4316c92 (patch) | |
tree | 3415567e3d86a50c743f916f9b0a3def3116cb83 /linux/drivers/media/dvb/ttusb-budget | |
parent | 2fd09a28e6d140a50c580963b9b9a46020047b76 (diff) | |
download | mediapointer-dvb-s2-bae40438ad428bc7d0305110c1598834d4316c92.tar.gz mediapointer-dvb-s2-bae40438ad428bc7d0305110c1598834d4316c92.tar.bz2 |
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
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 <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 20bfb0d28..34609e4d6 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/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 ttusb_channel *channel, const u8 * data, int len); #endif -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 *urb, struct pt_regs *ptregs) u8 *data; int len; numpkt++; - if ((jiffies - lastj) >= HZ) { + if (time_after_eq(jiffies, lastj + HZ)) { #if DEBUG > 2 printk ("frames/s: %d (ts: %d, stuff %d, sec: %d, invalid: %d, all: %d)\n", |