From: Tobias Klauser <[email-masked]>

Replace the MSECS() macro with the jiffies_to_msecs() function provided
in jiffies.h. The current macro is incorrect because HZ can have

Signed-off-by: Tobias Klauser <[email-masked]>
Signed-off-by: Domen Puncer <[email-masked]>
Index: dmitry/drivers/input/joydev.c
===================================================================
--- dmitry.orig/drivers/input/joydev.c	2005-07-05 16:25:15.000000000 +0200
+++ dmitry/drivers/input/joydev.c	2005-07-05 16:28:40.000000000 +0200
@@ -37,8 +37,6 @@
 #define JOYDEV_MINORS		16
 #define JOYDEV_BUFFER_SIZE	64
 
-#define MSECS(t)	(1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
-
 struct joydev {
 	int exist;
 	int open;
@@ -117,7 +115,7 @@
 			return;
 	}
 
-	event.time = MSECS(jiffies);
+	event.time = jiffies_to_msecs(jiffies);
 
 	list_for_each_entry(list, &joydev->list, node) {
 
@@ -245,7 +243,7 @@
 
 		struct js_event event;
 
-		event.time = MSECS(jiffies);
+		event.time = jiffies_to_msecs(jiffies);
 
 		if (list->startup < joydev->nkey) {
 			event.type = JS_EVENT_BUTTON | JS_EVENT_INIT;