diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-03-28 01:56:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 09:16:06 -0800 |
commit | 05613bdd8647bfc4535b0dcc8f1b95c8b39be394 (patch) | |
tree | aeb3860bdc08e20b455313246f69ae026daef091 | |
parent | 50297cbf07427b47f0fff5ade8e21cdabf860249 (diff) | |
download | linux-05613bdd8647bfc4535b0dcc8f1b95c8b39be394.tar.gz linux-05613bdd8647bfc4535b0dcc8f1b95c8b39be394.tar.bz2 linux-05613bdd8647bfc4535b0dcc8f1b95c8b39be394.zip |
[PATCH] nvidia-agp: use time_before_eq()
It deals with wrapping correctly and is nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/char/agp/nvidia-agp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 70b8ed9cd172..4c67135c12d8 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c @@ -11,6 +11,7 @@ #include <linux/gfp.h> #include <linux/page-flags.h> #include <linux/mm.h> +#include <linux/jiffies.h> #include "agp.h" /* NVIDIA registers */ @@ -256,7 +257,7 @@ static void nvidia_tlbflush(struct agp_memory *mem) do { pci_read_config_dword(nvidia_private.dev_1, NVIDIA_1_WBC, &wbc_reg); - if ((signed)(end - jiffies) <= 0) { + if (time_before_eq(end, jiffies)) { printk(KERN_ERR PFX "TLB flush took more than 3 seconds.\n"); } |