From: Marcelo Feitoza Parisi Date: Tue, 28 Mar 2006 09:56:45 +0000 (-0800) Subject: [PATCH] nvidia-agp: use time_before_eq() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05613bdd8647bfc4535b0dcc8f1b95c8b39be394;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] nvidia-agp: use time_before_eq() It deals with wrapping correctly and is nicer to read. Signed-off-by: Marcelo Feitoza Parisi Signed-off-by: Alexey Dobriyan Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 #include #include +#include #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"); }