X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fivtv%2Fivtv-fileops.c;h=2b74b0ab147788c7942d5af34dfe1beeb954f904;hb=2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92;hp=6fb96f19a8661dfe369f7303e6ed4e11301d3ad9;hpb=77aded6ba51f01335840ce8e18b413067810b68e;p=linux-2.6 diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 6fb96f19a8..2b74b0ab14 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c @@ -219,7 +219,9 @@ static struct ivtv_buffer *ivtv_get_buffer(struct ivtv_stream *s, int non_block, /* Process pending program info updates and pending VBI data */ ivtv_update_pgm_info(itv); - if (jiffies - itv->dualwatch_jiffies > msecs_to_jiffies(1000)) { + if (time_after(jiffies, + itv->dualwatch_jiffies + + msecs_to_jiffies(1000))) { itv->dualwatch_jiffies = jiffies; ivtv_dualwatch(itv); } @@ -753,8 +755,10 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait) IVTV_DEBUG_HI_FILE("Encoder poll\n"); poll_wait(filp, &s->waitq, wait); - if (eof || s->q_full.length) + if (s->q_full.length || s->q_io.length) return POLLIN | POLLRDNORM; + if (eof) + return POLLHUP; return 0; }