misc: tegra-profiler: remove polling mode
Igor Nabirushkin [Tue, 23 Aug 2016 08:25:14 +0000 (11:25 +0300)]
Tegra Profiler: remove polling mode (we don't use this mode).

Bug 1801804

Change-Id: Ifef37af2e05322c9de8c15c13c3782abb1dc29f6
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1208894
(cherry picked from commit 6e8d6cc08aeedc0d7308d9f66206fcaf46005045)
Reviewed-on: http://git-master/r/1251878
(cherry picked from commit c801413829a2e9a3648e0b3277c1047657e0f553)

drivers/misc/tegra-profiler/comm.c
drivers/misc/tegra-profiler/version.h

index 89637b8..7066349 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/vmalloc.h>
 #include <linux/miscdevice.h>
 #include <linux/sched.h>
-#include <linux/poll.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/mm.h>
@@ -55,8 +54,6 @@ struct quadd_comm_ctx {
 
        int params_ok;
 
-       wait_queue_head_t read_wait;
-
        struct miscdevice *misc_dev;
 
        struct list_head mmap_areas;
@@ -175,7 +172,6 @@ write_sample(struct quadd_ring_buffer *rb,
        }
 
        rb_hdr->pos_write = new_hdr.pos_write;
-       wake_up_all(&comm_ctx.read_wait);
 
        return length_sample;
 }
@@ -291,22 +287,6 @@ static int device_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static unsigned int
-device_poll(struct file *file, poll_table *wait)
-{
-       unsigned int mask = 0;
-
-       poll_wait(file, &comm_ctx.read_wait, wait);
-
-       if (get_data_size() > 0)
-               mask |= POLLIN | POLLRDNORM;
-
-       if (!atomic_read(&comm_ctx.active))
-               mask |= POLLHUP;
-
-       return mask;
-}
-
 static int
 init_mmap_hdr(struct quadd_mmap_rb_info *mmap_rb,
              struct quadd_mmap_area *mmap)
@@ -654,7 +634,6 @@ device_ioctl(struct file *file,
                if (atomic_cmpxchg(&comm_ctx.active, 1, 0)) {
                        reset_params_ok_flag();
                        comm_ctx.control->stop();
-                       wake_up_all(&comm_ctx.read_wait);
                        rb_stop();
                        pr_info("Stop profiling success\n");
                }
@@ -873,7 +852,6 @@ static void unregister(void)
 }
 
 static const struct file_operations qm_fops = {
-       .poll           = device_poll,
        .open           = device_open,
        .release        = device_release,
        .unlocked_ioctl = device_ioctl,
@@ -907,8 +885,6 @@ static int comm_init(void)
 
        comm_ctx.nr_users = 0;
 
-       init_waitqueue_head(&comm_ctx.read_wait);
-
        INIT_LIST_HEAD(&comm_ctx.mmap_areas);
        spin_lock_init(&comm_ctx.mmaps_lock);
 
index a6d95a3..7ada1bf 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __QUADD_VERSION_H
 #define __QUADD_VERSION_H
 
-#define QUADD_MODULE_VERSION           "1.106"
+#define QUADD_MODULE_VERSION           "1.108"
 #define QUADD_MODULE_BRANCH            "Dev"
 
 #endif /* __QUADD_VERSION_H */