linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / connector / cn_proc.c
index 3ece692..4b4d7db 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/kernel.h>
 #include <linux/ktime.h>
 #include <linux/init.h>
-#include <linux/connector.h>
 #include <asm/atomic.h>
 
 #include <linux/cn_proc.h>
@@ -51,7 +50,6 @@ void proc_fork_connector(struct task_struct *task)
        struct cn_msg *msg;
        struct proc_event *ev;
        __u8 buffer[CN_PROC_MSG_SIZE];
-       struct timespec ts;
 
        if (atomic_read(&proc_event_num_listeners) < 1)
                return;
@@ -59,8 +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);
-       ktime_get_ts(&ts); /* get high res monotonic timestamp */
-       ev->timestamp_ns = timespec_to_ns(&ts);
+       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;
@@ -78,7 +75,6 @@ void proc_exec_connector(struct task_struct *task)
 {
        struct cn_msg *msg;
        struct proc_event *ev;
-       struct timespec ts;
        __u8 buffer[CN_PROC_MSG_SIZE];
 
        if (atomic_read(&proc_event_num_listeners) < 1)
@@ -87,8 +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);
-       ktime_get_ts(&ts); /* get high res monotonic timestamp */
-       ev->timestamp_ns = timespec_to_ns(&ts);
+       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;
@@ -104,7 +99,6 @@ void proc_id_connector(struct task_struct *task, int which_id)
        struct cn_msg *msg;
        struct proc_event *ev;
        __u8 buffer[CN_PROC_MSG_SIZE];
-       struct timespec ts;
 
        if (atomic_read(&proc_event_num_listeners) < 1)
                return;
@@ -123,8 +117,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
        } else
                return;
        get_seq(&msg->seq, &ev->cpu);
-       ktime_get_ts(&ts); /* get high res monotonic timestamp */
-       ev->timestamp_ns = timespec_to_ns(&ts);
+       ktime_get_ts(&ev->timestamp);
 
        memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
        msg->ack = 0; /* not used */
@@ -137,7 +130,6 @@ void proc_exit_connector(struct task_struct *task)
        struct cn_msg *msg;
        struct proc_event *ev;
        __u8 buffer[CN_PROC_MSG_SIZE];
-       struct timespec ts;
 
        if (atomic_read(&proc_event_num_listeners) < 1)
                return;
@@ -145,8 +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);
-       ktime_get_ts(&ts); /* get high res monotonic timestamp */
-       ev->timestamp_ns = timespec_to_ns(&ts);
+       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;
@@ -172,7 +163,6 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
        struct cn_msg *msg;
        struct proc_event *ev;
        __u8 buffer[CN_PROC_MSG_SIZE];
-       struct timespec ts;
 
        if (atomic_read(&proc_event_num_listeners) < 1)
                return;
@@ -180,8 +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;
-       ktime_get_ts(&ts); /* get high res monotonic timestamp */
-       ev->timestamp_ns = timespec_to_ns(&ts);
+       ktime_get_ts(&ev->timestamp);
        ev->cpu = -1;
        ev->what = PROC_EVENT_NONE;
        ev->event_data.ack.err = err;