diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-03-28 04:56:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:07 -0500 |
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 94ef3f08d378..5b15998c71a6 100644 --- a/drivers/scsi/qlogicfc.c +++ b/drivers/scsi/qlogicfc.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/unistd.h> | 61 | #include <linux/unistd.h> |
62 | #include <linux/spinlock.h> | 62 | #include <linux/spinlock.h> |
63 | #include <linux/interrupt.h> | 63 | #include <linux/interrupt.h> |
64 | #include <linux/jiffies.h> | ||
64 | #include <asm/io.h> | 65 | #include <asm/io.h> |
65 | #include <asm/irq.h> | 66 | #include <asm/irq.h> |
66 | #include "scsi.h" | 67 | #include "scsi.h" |
@@ -1325,7 +1326,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *)) | |||
1325 | cmd->control_flags = cpu_to_le16(CFLAG_READ); | 1326 | cmd->control_flags = cpu_to_le16(CFLAG_READ); |
1326 | 1327 | ||
1327 | if (Cmnd->device->tagged_supported) { | 1328 | if (Cmnd->device->tagged_supported) { |
1328 | if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * ISP_TIMEOUT)) { | 1329 | if (time_after(jiffies, hostdata->tag_ages[Cmnd->device->id] + (2 * ISP_TIMEOUT))) { |
1329 | cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG); | 1330 | cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG); |
1330 | hostdata->tag_ages[Cmnd->device->id] = jiffies; | 1331 | hostdata->tag_ages[Cmnd->device->id] = jiffies; |
1331 | } else | 1332 | } else |