提交 ed3de601 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

V4L/DVB: uvcvideo: Use POLLOUT and POLLWRNORM for output devices

The V4L2 specification requires drivers to use the write events in the
file operations poll handler for output devices. The uvcvideo driver
erroneously used read events for all devices. Fix this.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 35a00c41
......@@ -388,8 +388,12 @@ unsigned int uvc_queue_poll(struct uvc_video_queue *queue, struct file *file,
poll_wait(file, &buf->wait, wait);
if (buf->state == UVC_BUF_STATE_DONE ||
buf->state == UVC_BUF_STATE_ERROR)
mask |= POLLIN | POLLRDNORM;
buf->state == UVC_BUF_STATE_ERROR) {
if (queue->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
mask |= POLLIN | POLLRDNORM;
else
mask |= POLLOUT | POLLWRNORM;
}
done:
mutex_unlock(&queue->mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册