From: Hans Verkuil Date: Mon, 28 Apr 2008 15:18:00 +0000 (-0300) Subject: V4L/DVB (7791): ivtv: POLLHUP must be returned on eof X-Git-Tag: v2.6.26-rc1~344^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16928be301b0881f7b7afcf95e0ee7dc3214de8d;p=linux-2.6 V4L/DVB (7791): ivtv: POLLHUP must be returned on eof Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index a7640c49f1..2b74b0ab14 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c @@ -755,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 || s->q_io.length) + if (s->q_full.length || s->q_io.length) return POLLIN | POLLRDNORM; + if (eof) + return POLLHUP; return 0; }