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-Url: https://git.stricted.de/?a=commitdiff_plain;h=16928be301b0881f7b7afcf95e0ee7dc3214de8d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 a7640c49f1d8..2b74b0ab1477 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; }