diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2008-12-18 10:28:54 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:40:22 -0500 |
commit | 1c3bb7431d16f7486a8523d54380bad89c485dc8 (patch) | |
tree | 89dd8e65f627df726e70de771130398ba73148b3 /include/media | |
parent | bf507158eb27ea94aca300b28ecee60fdbb40007 (diff) |
V4L/DVB (10083): soc-camera: unify locking, play nicer with videobuf locking
Move mutex from host drivers to camera device object, take into account
videobuf locking.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/soc_camera.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 38b826c608be..8bae9a359d93 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -12,9 +12,10 @@ | |||
12 | #ifndef SOC_CAMERA_H | 12 | #ifndef SOC_CAMERA_H |
13 | #define SOC_CAMERA_H | 13 | #define SOC_CAMERA_H |
14 | 14 | ||
15 | #include <linux/mutex.h> | ||
16 | #include <linux/pm.h> | ||
15 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
16 | #include <media/videobuf-core.h> | 18 | #include <media/videobuf-core.h> |
17 | #include <linux/pm.h> | ||
18 | 19 | ||
19 | struct soc_camera_device { | 20 | struct soc_camera_device { |
20 | struct list_head list; | 21 | struct list_head list; |
@@ -45,9 +46,10 @@ struct soc_camera_device { | |||
45 | struct soc_camera_format_xlate *user_formats; | 46 | struct soc_camera_format_xlate *user_formats; |
46 | int num_user_formats; | 47 | int num_user_formats; |
47 | struct module *owner; | 48 | struct module *owner; |
48 | void *host_priv; /* per-device host private data */ | 49 | void *host_priv; /* Per-device host private data */ |
49 | /* soc_camera.c private count. Only accessed with video_lock held */ | 50 | /* soc_camera.c private count. Only accessed with .video_lock held */ |
50 | int use_count; | 51 | int use_count; |
52 | struct mutex video_lock; /* Protects device data */ | ||
51 | }; | 53 | }; |
52 | 54 | ||
53 | struct soc_camera_file { | 55 | struct soc_camera_file { |