From: Hans Verkuil Date: Wed, 13 Jul 2011 07:03:52 +0000 (-0300) Subject: [media] videobuf: only start streaming in poll() if so requested by the poll mask X-Git-Tag: v3.5-rc5~26^2~527 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e17e9a9f6bfedb6aefcd88632f5d6d17c871176;p=platform%2Fkernel%2Flinux-3.10.git [media] videobuf: only start streaming in poll() if so requested by the poll mask Signed-off-by: Hans Verkuil Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index de4fa4e..ffdf59c 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -1129,6 +1129,7 @@ unsigned int videobuf_poll_stream(struct file *file, struct videobuf_queue *q, poll_table *wait) { + unsigned long req_events = poll_requested_events(wait); struct videobuf_buffer *buf = NULL; unsigned int rc = 0; @@ -1137,7 +1138,7 @@ unsigned int videobuf_poll_stream(struct file *file, if (!list_empty(&q->stream)) buf = list_entry(q->stream.next, struct videobuf_buffer, stream); - } else { + } else if (req_events & (POLLIN | POLLRDNORM)) { if (!q->reading) __videobuf_read_start(q); if (!q->reading) {