[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>
This commit is contained in:

committed by
Linus Torvalds

parent
9bae1ff3e7
commit
60c904ae5b
@@ -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);
|
||||
|
Reference in New Issue
Block a user