diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-12-14 06:28:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-07 04:40:44 -0500 |
commit | af2c5debe11f51d9af42accd9dd495478bb726fd (patch) | |
tree | 94f84ee42c6089ed98fb3461ce2906fbdadf8f15 | |
parent | a9fe3beee6c698a9802e1bb4928b107695d2f12e (diff) |
[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 <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/i2c/saa6588.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
402 | case SAA6588_CMD_CLOSE: | 402 | case SAA6588_CMD_CLOSE: |
403 | s->data_available_for_read = 1; | 403 | s->data_available_for_read = 1; |
404 | wake_up_interruptible(&s->read_queue); | 404 | wake_up_interruptible(&s->read_queue); |
405 | s->data_available_for_read = 0; | ||
405 | a->result = 0; | 406 | a->result = 0; |
406 | break; | 407 | break; |
407 | /* --- read() for /dev/radio --- */ | 408 | /* --- read() for /dev/radio --- */ |