summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-08-19 21:39:54 +0900
committerInki Dae <inki.dae@samsung.com>2014-10-15 20:05:08 +0900
commit8cd1ecd13b4e9595bd30b01a1fb1c85aad617e23 (patch)
tree5ac3b89830a27a5ff2e15b10a6c3de994ebaae1a /drivers
parentee35a5762f5bafe30a24faff2c0bd2e509c0822c (diff)
downloadlinux-3.10-8cd1ecd13b4e9595bd30b01a1fb1c85aad617e23.tar.gz
linux-3.10-8cd1ecd13b4e9595bd30b01a1fb1c85aad617e23.tar.bz2
linux-3.10-8cd1ecd13b4e9595bd30b01a1fb1c85aad617e23.zip
Revert "dmabuf-sync: add select system call support."
This reverts commit 4439a419906d4fe3d7e5093292bd2f4f4fbfc8c2.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/dma-buf.c48
-rw-r--r--drivers/base/dmabuf-sync.c18
2 files changed, 0 insertions, 66 deletions
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index fa42c56b30d..3d2d12bd058 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -29,7 +29,6 @@
#include <linux/export.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
-#include <linux/poll.h>
#include <linux/dmabuf-sync.h>
static inline int is_dma_buf_file(struct file *);
@@ -81,52 +80,6 @@ static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct *vma)
return dmabuf->ops->mmap(dmabuf, vma);
}
-static unsigned int dma_buf_poll(struct file *filp,
- struct poll_table_struct *poll)
-{
- struct dma_buf *dmabuf;
- struct dmabuf_sync_reservation *robj;
- int ret = 0;
-
- if (!is_dma_buf_file(filp))
- return POLLERR;
-
- dmabuf = filp->private_data;
- if (!dmabuf || !dmabuf->sync)
- return POLLERR;
-
- robj = dmabuf->sync;
-
- mutex_lock(&robj->lock);
-
- robj->polled = true;
-
- /*
- * CPU or DMA access to this buffer has been completed, and
- * the blocked task has been waked up. Return poll event
- * so that the task can get out of select().
- */
- if (robj->poll_event) {
- robj->poll_event = false;
- mutex_unlock(&robj->lock);
- return POLLIN | POLLOUT;
- }
-
- /*
- * There is no anyone accessing this buffer so just return POLLERR.
- */
- if (!robj->locked) {
- mutex_unlock(&robj->lock);
- return POLLERR;
- }
-
- poll_wait(filp, &robj->poll_wait, poll);
-
- mutex_unlock(&robj->lock);
-
- return ret;
-}
-
static int dma_buf_lock(struct file *file, int cmd, struct file_lock *fl)
{
struct dma_buf *dmabuf;
@@ -162,7 +115,6 @@ static int dma_buf_lock(struct file *file, int cmd, struct file_lock *fl)
static const struct file_operations dma_buf_fops = {
.release = dma_buf_release,
.mmap = dma_buf_mmap_internal,
- .poll = dma_buf_poll,
.lock = dma_buf_lock,
};
diff --git a/drivers/base/dmabuf-sync.c b/drivers/base/dmabuf-sync.c
index dab5b32a833..abfd8e3f009 100644
--- a/drivers/base/dmabuf-sync.c
+++ b/drivers/base/dmabuf-sync.c
@@ -63,12 +63,6 @@ static void dmabuf_sync_timeout_worker(struct work_struct *work)
continue;
}
- if (sobj->robj->polled) {
- sobj->robj->poll_event = true;
- sobj->robj->polled = false;
- wake_up_interruptible(&sobj->robj->poll_wait);
- }
-
if (atomic_add_unless(&sobj->robj->shared_cnt, -1, 1)) {
mutex_unlock(&sobj->robj->lock);
continue;
@@ -283,12 +277,6 @@ static void dmabuf_sync_unlock_objs(struct dmabuf_sync *sync,
list_for_each_entry(sobj, &sync->syncs, head) {
mutex_lock(&sobj->robj->lock);
- if (sobj->robj->polled) {
- sobj->robj->poll_event = true;
- sobj->robj->polled = false;
- wake_up_interruptible(&sobj->robj->poll_wait);
- }
-
if (atomic_add_unless(&sobj->robj->shared_cnt, -1, 1)) {
mutex_unlock(&sobj->robj->lock);
continue;
@@ -636,12 +624,6 @@ void dmabuf_sync_single_unlock(struct dma_buf *dmabuf)
mutex_lock(&robj->lock);
- if (robj->polled) {
- robj->poll_event = true;
- robj->polled = false;
- wake_up_interruptible(&robj->poll_wait);
- }
-
if (atomic_add_unless(&robj->shared_cnt, -1 , 1)) {
mutex_unlock(&robj->lock);
dma_buf_put(dmabuf);