From: Hans Verkuil Date: Sat, 14 Dec 2013 11:28:34 +0000 (-0300) Subject: upstream: [media] saa6588: after calling CMD_CLOSE, CMD_POLL is broken X-Git-Tag: submit/tizen/20141121.110247~930 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ea80f0ecfa9356d5bb4348cd3a2618e61b0c60a;p=platform%2Fkernel%2Flinux-3.10.git upstream: [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 --- diff --git a/drivers/media/i2c/saa6588.c b/drivers/media/i2c/saa6588.c index 815c71b..2960b5a 100644 --- a/drivers/media/i2c/saa6588.c +++ b/drivers/media/i2c/saa6588.c @@ -404,6 +404,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 --- */