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/BusLogic.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/BusLogic.c')
-rw-r--r-- | drivers/scsi/BusLogic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 1c459343292b..5bf83cbca868 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/stat.h> | 41 | #include <linux/stat.h> |
42 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/jiffies.h> | ||
44 | #include <scsi/scsicam.h> | 45 | #include <scsi/scsicam.h> |
45 | 46 | ||
46 | #include <asm/dma.h> | 47 | #include <asm/dma.h> |
@@ -2896,7 +2897,7 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou | |||
2896 | */ | 2897 | */ |
2897 | if (HostAdapter->ActiveCommands[TargetID] == 0) | 2898 | if (HostAdapter->ActiveCommands[TargetID] == 0) |
2898 | HostAdapter->LastSequencePoint[TargetID] = jiffies; | 2899 | HostAdapter->LastSequencePoint[TargetID] = jiffies; |
2899 | else if (jiffies - HostAdapter->LastSequencePoint[TargetID] > 4 * HZ) { | 2900 | else if (time_after(jiffies, HostAdapter->LastSequencePoint[TargetID] + 4 * HZ)) { |
2900 | HostAdapter->LastSequencePoint[TargetID] = jiffies; | 2901 | HostAdapter->LastSequencePoint[TargetID] = jiffies; |
2901 | QueueTag = BusLogic_OrderedQueueTag; | 2902 | QueueTag = BusLogic_OrderedQueueTag; |
2902 | } | 2903 | } |