Commit 6f5eacfc authored by Tobias Klauser's avatar Tobias Klauser Committed by Dmitry Torokhov

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: default avatarTobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 6345fdfd
......@@ -37,8 +37,6 @@ MODULE_LICENSE("GPL");
#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 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
return;
}
event.time = MSECS(jiffies);
event.time = jiffies_to_msecs(jiffies);
list_for_each_entry(list, &joydev->list, node) {
......@@ -245,7 +243,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment