aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2005-07-11 02:08:56 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-07-11 02:08:56 -0400
commit6f5eacfc1e9a12ffca10b4abe8e9fddf1997da6f (patch)
tree92fa84a1b03f4378b63a347dc758b0de555a0d9f /drivers/input
parent6345fdfd190659a2316d18065871245e3a1e0f84 (diff)
Input: joydev - remove custom conversion from jiffies to msecs
Replace the MSECS() macro with the jiffies_to_msecs() function provided in jiffies.h Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joydev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index ff8e1bbd0e13..e0938d1d3ad7 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -37,8 +37,6 @@ MODULE_LICENSE("GPL");
37#define JOYDEV_MINORS 16 37#define JOYDEV_MINORS 16
38#define JOYDEV_BUFFER_SIZE 64 38#define JOYDEV_BUFFER_SIZE 64
39 39
40#define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
41
42struct joydev { 40struct joydev {
43 int exist; 41 int exist;
44 int open; 42 int open;
@@ -117,7 +115,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
117 return; 115 return;
118 } 116 }
119 117
120 event.time = MSECS(jiffies); 118 event.time = jiffies_to_msecs(jiffies);
121 119
122 list_for_each_entry(list, &joydev->list, node) { 120 list_for_each_entry(list, &joydev->list, node) {
123 121
@@ -245,7 +243,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo
245 243
246 struct js_event event; 244 struct js_event event;
247 245
248 event.time = MSECS(jiffies); 246 event.time = jiffies_to_msecs(jiffies);
249 247
250 if (list->startup < joydev->nkey) { 248 if (list->startup < joydev->nkey) {
251 event.type = JS_EVENT_BUTTON | JS_EVENT_INIT; 249 event.type = JS_EVENT_BUTTON | JS_EVENT_INIT;