aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-fileops.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-fileops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c
index a7f54b010a5c..353142d01446 100644
--- a/drivers/media/video/ivtv/ivtv-fileops.c
+++ b/drivers/media/video/ivtv/ivtv-fileops.c
@@ -750,6 +750,7 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait)
750 struct ivtv *itv = id->itv; 750 struct ivtv *itv = id->itv;
751 struct ivtv_stream *s = &itv->streams[id->type]; 751 struct ivtv_stream *s = &itv->streams[id->type];
752 int eof = test_bit(IVTV_F_S_STREAMOFF, &s->s_flags); 752 int eof = test_bit(IVTV_F_S_STREAMOFF, &s->s_flags);
753 unsigned res = 0;
753 754
754 /* Start a capture if there is none */ 755 /* Start a capture if there is none */
755 if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags)) { 756 if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags)) {
@@ -769,12 +770,16 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait)
769 /* add stream's waitq to the poll list */ 770 /* add stream's waitq to the poll list */
770 IVTV_DEBUG_HI_FILE("Encoder poll\n"); 771 IVTV_DEBUG_HI_FILE("Encoder poll\n");
771 poll_wait(filp, &s->waitq, wait); 772 poll_wait(filp, &s->waitq, wait);
773 if (v4l2_event_pending(&id->fh))
774 res |= POLLPRI;
775 else
776 poll_wait(filp, &id->fh.events->wait, wait);
772 777
773 if (s->q_full.length || s->q_io.length) 778 if (s->q_full.length || s->q_io.length)
774 return POLLIN | POLLRDNORM; 779 return res | POLLIN | POLLRDNORM;
775 if (eof) 780 if (eof)
776 return POLLHUP; 781 return res | POLLHUP;
777 return 0; 782 return res;
778} 783}
779 784
780void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end) 785void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end)