From af2c5debe11f51d9af42accd9dd495478bb726fd Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 14 Dec 2013 08:28:34 -0300 Subject: [PATCH] [media] saa6588: after calling CMD_CLOSE, CMD_POLL is broken CMD_CLOSE sets data_available_for_read to 1, which is necessary to do the wakeup call, but it is never reset to 0. Because of this calling CMD_POLL afterwards will always return that data is available, even if there isn't any. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/saa6588.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/saa6588.c b/drivers/media/i2c/saa6588.c index 70bc72e795d0..54dd7a09f9d3 100644 --- a/drivers/media/i2c/saa6588.c +++ b/drivers/media/i2c/saa6588.c @@ -402,6 +402,7 @@ static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) case SAA6588_CMD_CLOSE: s->data_available_for_read = 1; wake_up_interruptible(&s->read_queue); + s->data_available_for_read = 0; a->result = 0; break; /* --- read() for /dev/radio --- */ -- 2.30.2