Merge remote-tracking branch 'tip/perf/core' into perf/urgent
[linux-2.6-block.git] / tools / perf / util / thread.c
index 7bfb740d2ede59ea8377c2747d061f1eedf66fa1..3e29a4e8b5e6645097c805d3dee4e343cb83aca2 100644 (file)
@@ -158,13 +158,13 @@ static struct namespaces *__thread__namespaces(const struct thread *thread)
        return list_first_entry(&thread->namespaces_list, struct namespaces, list);
 }
 
-struct namespaces *thread__namespaces(const struct thread *thread)
+struct namespaces *thread__namespaces(struct thread *thread)
 {
        struct namespaces *ns;
 
-       down_read((struct rw_semaphore *)&thread->namespaces_lock);
+       down_read(&thread->namespaces_lock);
        ns = __thread__namespaces(thread);
-       up_read((struct rw_semaphore *)&thread->namespaces_lock);
+       up_read(&thread->namespaces_lock);
 
        return ns;
 }
@@ -288,13 +288,13 @@ static const char *__thread__comm_str(const struct thread *thread)
        return comm__str(comm);
 }
 
-const char *thread__comm_str(const struct thread *thread)
+const char *thread__comm_str(struct thread *thread)
 {
        const char *str;
 
-       down_read((struct rw_semaphore *)&thread->comm_lock);
+       down_read(&thread->comm_lock);
        str = __thread__comm_str(thread);
-       up_read((struct rw_semaphore *)&thread->comm_lock);
+       up_read(&thread->comm_lock);
 
        return str;
 }