[PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace the MS_TO_JIFFIES() macro with msecs_to_jiffies() from jiffies.h
The current macro is incorrect because HZ can have different values on
different architectures.
The patch also removes the JIFFIES_TO_MS() macro which is not used
anymore in the code.

Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxxx>

diff -urpN linux-2.6.12-rc2-mm3/drivers/scsi/a100u2w.c linux-2.6.12-rc2-mm3-tk/drivers/scsi/a100u2w.c
--- linux-2.6.12-rc2-mm3/drivers/scsi/a100u2w.c	2005-03-02 08:38:12.000000000 +0100
+++ linux-2.6.12-rc2-mm3-tk/drivers/scsi/a100u2w.c	2005-04-13 13:53:19.000000000 +0200
@@ -100,10 +100,6 @@
 
 #include "a100u2w.h"
 
-
-#define JIFFIES_TO_MS(t) ((t) * 1000 / HZ)
-#define MS_TO_JIFFIES(j) ((j * HZ) / 1000)
-
 static ORC_SCB *orc_alloc_scb(ORC_HCS * hcsp);
 static void inia100SCBPost(BYTE * pHcb, BYTE * pScb);
 
@@ -160,7 +156,7 @@ static UCHAR dftNvRam[64] =
 /***************************************************************************/
 static void waitForPause(unsigned amount)
 {
-	ULONG the_time = jiffies + MS_TO_JIFFIES(amount);
+	ULONG the_time = jiffies + msecs_to_jiffies(amount);
 	while (time_before_eq(jiffies, the_time))
 		cpu_relax();
 }
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux