lkml.org 
[lkml]   [2005]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 18/24] joydev - remove MSECS macro
From: Tobias Klauser <tklauser@nuerscht.ch>

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>
---

drivers/input/joydev.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

Index: work/drivers/input/joydev.c
===================================================================
--- work.orig/drivers/input/joydev.c
+++ work/drivers/input/joydev.c
@@ -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_ha
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 *

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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-25 09:14    [W:0.186 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site