linux/drivers/media/video/uvc
Hans Verkuil 6e6d76cdc5 [media] v4l2-event: fix regression with initial event handling
If the V4L2_EVENT_SUB_FL_SEND_INITIAL was set, then the application expects
to receive an initial event of the initial value of the control.

However, commit c53c254933 that added the new
v4l2_subscribed_event_ops introduced a regression: while the code still queued
that initial event the __v4l2_event_queue_fh() function was modified to ignore
such requests if sev->elems was 0 (meaning that the event subscription wasn't
finished yet).

And sev->elems was only set to a non-zero value after the add operation
returned.

This patch fixes this by passing the elems value to the add function. Then the
add function can set it before queuing the initial event.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 08:43:06 -03:00
..
Kconfig [media] uvcvideo: Use videobuf2-vmalloc 2011-12-11 11:13:06 -02:00
Makefile [media] uvcvideo: Add debugfs support 2011-12-11 11:22:07 -02:00
uvc_ctrl.c [media] v4l2-event: fix regression with initial event handling 2012-05-15 08:43:06 -03:00
uvc_debugfs.c [media] uvcvideo: Extract video stream statistics 2011-12-11 11:22:08 -02:00
uvc_driver.c [media] uvcvideo: uvc_driver.c: use linux/atomic.h 2012-03-19 14:08:34 -03:00
uvc_entity.c [media] uvcvideo: Fix crash when linking entities 2011-09-21 22:18:07 -03:00
uvc_isight.c [media] uvcvideo: Move fields from uvc_buffer::buf to uvc_buffer 2011-12-11 11:12:05 -02:00
uvc_queue.c [media] uvcvideo: Use videobuf2 .get_unmapped_area() implementation 2012-05-08 13:46:19 -03:00
uvc_status.c [media] uvcvideo: Update e-mail address and copyright notices 2010-10-21 01:18:18 -02:00
uvc_v4l2.c [media] uvcvideo: Fix ENUMINPUT handling 2012-05-08 13:45:53 -03:00
uvc_video.c [media] uvcvideo: Fix race-related crash in uvc_video_clock_update() 2012-04-09 10:15:28 -03:00
uvcvideo.h [media] uvcvideo: Drop unused ctrl member from struct uvc_control_mapping 2012-05-07 16:41:57 -03:00