]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Switch getnstimestamp() calls to ktime_get_ts()
authorMatt Helsley <matthltc@us.ibm.com>
Tue, 10 Jan 2006 04:52:40 +0000 (20:52 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 16:01:39 +0000 (08:01 -0800)
Use ktime_get_ts() to take the timestamp instead of getnstimestamp().  This
patch prepares to remove getnstimestamp() by switching its only user to a
different function with almost exactly the same code.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/connector/cn_proc.c

index 385e52930c02353a396df4009f0a421f2cecf1d5..4b4d7db1ff7bc94dacbdea588904b3a31f084aef 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/ktime.h>
 #include <linux/init.h>
 #include <asm/atomic.h>
 
@@ -56,7 +57,7 @@ void proc_fork_connector(struct task_struct *task)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        get_seq(&msg->seq, &ev->cpu);
-       getnstimestamp(&ev->timestamp);
+       ktime_get_ts(&ev->timestamp); /* get high res monotonic timestamp */
        ev->what = PROC_EVENT_FORK;
        ev->event_data.fork.parent_pid = task->real_parent->pid;
        ev->event_data.fork.parent_tgid = task->real_parent->tgid;
@@ -82,7 +83,7 @@ void proc_exec_connector(struct task_struct *task)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        get_seq(&msg->seq, &ev->cpu);
-       getnstimestamp(&ev->timestamp);
+       ktime_get_ts(&ev->timestamp);
        ev->what = PROC_EVENT_EXEC;
        ev->event_data.exec.process_pid = task->pid;
        ev->event_data.exec.process_tgid = task->tgid;
@@ -116,7 +117,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
        } else
                return;
        get_seq(&msg->seq, &ev->cpu);
-       getnstimestamp(&ev->timestamp);
+       ktime_get_ts(&ev->timestamp);
 
        memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
        msg->ack = 0; /* not used */
@@ -136,7 +137,7 @@ void proc_exit_connector(struct task_struct *task)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        get_seq(&msg->seq, &ev->cpu);
-       getnstimestamp(&ev->timestamp);
+       ktime_get_ts(&ev->timestamp);
        ev->what = PROC_EVENT_EXIT;
        ev->event_data.exit.process_pid = task->pid;
        ev->event_data.exit.process_tgid = task->tgid;
@@ -169,7 +170,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        msg->seq = rcvd_seq;
-       getnstimestamp(&ev->timestamp);
+       ktime_get_ts(&ev->timestamp);
        ev->cpu = -1;
        ev->what = PROC_EVENT_NONE;
        ev->event_data.ack.err = err;