summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc/uvcvideo.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-11-21 17:36:34 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-01 23:10:24 +0100
commit6947756dfcecc493062a46e77f6bf51dddb5be75 (patch)
tree9ef949c2b95d43ce0389ea6d54b5b469322aaf0b /drivers/media/video/uvc/uvcvideo.h
parent[media] uvcvideo: Move mmap() handler to uvc_queue.c (diff)
downloadlinux-6947756dfcecc493062a46e77f6bf51dddb5be75.tar.xz
linux-6947756dfcecc493062a46e77f6bf51dddb5be75.zip
[media] uvcvideo: Lock stream mutex when accessing format-related information
The stream mutex protects access to the struct uvc_streaming ctrl, cur_format and cur_frame fields as well as to the hardware probe control. Lock it appropriately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
-rw-r--r--drivers/media/video/uvc/uvcvideo.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h
index ea893bc0df07..45f01e7e13d2 100644
--- a/drivers/media/video/uvc/uvcvideo.h
+++ b/drivers/media/video/uvc/uvcvideo.h
@@ -436,7 +436,9 @@ struct uvc_streaming {
struct uvc_streaming_control ctrl;
struct uvc_format *cur_format;
struct uvc_frame *cur_frame;
-
+ /* Protect access to ctrl, cur_format, cur_frame and hardware video
+ * probe control.
+ */
struct mutex mutex;
unsigned int frozen : 1;