summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ppa.c
diff options
context:
space:
mode:
authorMarcelo Feitoza Parisi <marcelo@feitoza.com.br>2006-03-28 01:56:47 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 09:16:07 -0800
commit60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4 (patch)
treeaf7593441b9d640302a73a6406218a6b9cdc6aa2 /drivers/scsi/ppa.c
parent9bae1ff3e7926fe5e92db2f3c6d8832f18f777bc (diff)
downloadlinux-60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4.tar.gz
linux-60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4.tar.bz2
linux-60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4.zip
[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/ppa.c')
-rw-r--r--drivers/scsi/ppa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 05347eed9dd5..fee843fab1c7 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -18,6 +18,7 @@
#include <linux/parport.h>
#include <linux/workqueue.h>
#include <linux/delay.h>
+#include <linux/jiffies.h>
#include <asm/io.h>
#include <scsi/scsi.h>
@@ -726,7 +727,7 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
retv--;
if (retv) {
- if ((jiffies - dev->jstart) > (1 * HZ)) {
+ if (time_after(jiffies, dev->jstart + (1 * HZ))) {
printk
("ppa: Parallel port cable is unplugged!!\n");
ppa_fail(dev, DID_BUS_BUSY);