From a010c33a98500945b2be98f2a269ca67890d3168 Mon Sep 17 00:00:00 2001 From: Pawel Osciak Date: Mon, 29 Mar 2010 05:16:31 -0300 Subject: [PATCH] --- yaml --- r: 193101 b: refs/heads/master c: 9b558434136138edc79710385aaf613cb4b30459 h: refs/heads/master i: 193099: 98e2ed7de6c6010fc066eb75244127246dc8132d v: v3 --- [refs] | 2 +- trunk/drivers/media/video/videobuf-core.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 510120bd0ef2..85cbc8e749b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fc7f8fd42c2b934ac348995e0c530c917fc277d5 +refs/heads/master: 9b558434136138edc79710385aaf613cb4b30459 diff --git a/trunk/drivers/media/video/videobuf-core.c b/trunk/drivers/media/video/videobuf-core.c index f47cf1ca1239..7d3378437ded 100644 --- a/trunk/drivers/media/video/videobuf-core.c +++ b/trunk/drivers/media/video/videobuf-core.c @@ -1120,8 +1120,18 @@ unsigned int videobuf_poll_stream(struct file *file, if (0 == rc) { poll_wait(file, &buf->done, wait); if (buf->state == VIDEOBUF_DONE || - buf->state == VIDEOBUF_ERROR) - rc = POLLIN|POLLRDNORM; + buf->state == VIDEOBUF_ERROR) { + switch (q->type) { + case V4L2_BUF_TYPE_VIDEO_OUTPUT: + case V4L2_BUF_TYPE_VBI_OUTPUT: + case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: + rc = POLLOUT | POLLWRNORM; + break; + default: + rc = POLLIN | POLLRDNORM; + break; + } + } } mutex_unlock(&q->vb_lock); return rc;