diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-03-28 01:56:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 09:16:07 -0800 |
commit | 60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4 (patch) | |
tree | af7593441b9d640302a73a6406218a6b9cdc6aa2 /drivers/scsi/qlogicfc.c | |
parent | 9bae1ff3e7926fe5e92db2f3c6d8832f18f777bc (diff) |
[PATCH] drivers/scsi/*: use time_after() and friends
They deal with wrapping correctly and are nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/qlogicfc.c')
-rw-r--r-- | drivers/scsi/qlogicfc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c index 94ef3f08d37..5b15998c71a 100644 --- a/drivers/scsi/qlogicfc.c +++ b/drivers/scsi/qlogicfc.c @@ -61,6 +61,7 @@ #include <linux/unistd.h> #include <linux/spinlock.h> #include <linux/interrupt.h> +#include <linux/jiffies.h> #include <asm/io.h> #include <asm/irq.h> #include "scsi.h" @@ -1325,7 +1326,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *)) cmd->control_flags = cpu_to_le16(CFLAG_READ); if (Cmnd->device->tagged_supported) { - if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * ISP_TIMEOUT)) { + if (time_after(jiffies, hostdata->tag_ages[Cmnd->device->id] + (2 * ISP_TIMEOUT))) { cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG); hostdata->tag_ages[Cmnd->device->id] = jiffies; } else |