diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/uvc/uvc_queue.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c index 4a925a31b0e0..133c78d113ac 100644 --- a/drivers/media/video/uvc/uvc_queue.c +++ b/drivers/media/video/uvc/uvc_queue.c | |||
@@ -388,8 +388,12 @@ unsigned int uvc_queue_poll(struct uvc_video_queue *queue, struct file *file, | |||
388 | 388 | ||
389 | poll_wait(file, &buf->wait, wait); | 389 | poll_wait(file, &buf->wait, wait); |
390 | if (buf->state == UVC_BUF_STATE_DONE || | 390 | if (buf->state == UVC_BUF_STATE_DONE || |
391 | buf->state == UVC_BUF_STATE_ERROR) | 391 | buf->state == UVC_BUF_STATE_ERROR) { |
392 | mask |= POLLIN | POLLRDNORM; | 392 | if (queue->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) |
393 | mask |= POLLIN | POLLRDNORM; | ||
394 | else | ||
395 | mask |= POLLOUT | POLLWRNORM; | ||
396 | } | ||
393 | 397 | ||
394 | done: | 398 | done: |
395 | mutex_unlock(&queue->mutex); | 399 | mutex_unlock(&queue->mutex); |