diff options
Diffstat (limited to 'drivers/media/video/sn9c102/sn9c102.h')
-rw-r--r-- | drivers/media/video/sn9c102/sn9c102.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/sn9c102/sn9c102.h b/drivers/media/video/sn9c102/sn9c102.h index 11fcb49f5b99..2e3c3de793a7 100644 --- a/drivers/media/video/sn9c102/sn9c102.h +++ b/drivers/media/video/sn9c102/sn9c102.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
38 | #include <linux/stddef.h> | 38 | #include <linux/stddef.h> |
39 | #include <linux/kref.h> | ||
39 | 40 | ||
40 | #include "sn9c102_config.h" | 41 | #include "sn9c102_config.h" |
41 | #include "sn9c102_sensor.h" | 42 | #include "sn9c102_sensor.h" |
@@ -94,7 +95,7 @@ struct sn9c102_module_param { | |||
94 | }; | 95 | }; |
95 | 96 | ||
96 | static DEFINE_MUTEX(sn9c102_sysfs_lock); | 97 | static DEFINE_MUTEX(sn9c102_sysfs_lock); |
97 | static DECLARE_RWSEM(sn9c102_disconnect); | 98 | static DECLARE_RWSEM(sn9c102_dev_lock); |
98 | 99 | ||
99 | struct sn9c102_device { | 100 | struct sn9c102_device { |
100 | struct video_device* v4ldev; | 101 | struct video_device* v4ldev; |
@@ -122,12 +123,14 @@ struct sn9c102_device { | |||
122 | 123 | ||
123 | struct sn9c102_module_param module_param; | 124 | struct sn9c102_module_param module_param; |
124 | 125 | ||
126 | struct kref kref; | ||
125 | enum sn9c102_dev_state state; | 127 | enum sn9c102_dev_state state; |
126 | u8 users; | 128 | u8 users; |
127 | 129 | ||
128 | struct mutex dev_mutex, fileop_mutex; | 130 | struct completion probe; |
131 | struct mutex open_mutex, fileop_mutex; | ||
129 | spinlock_t queue_lock; | 132 | spinlock_t queue_lock; |
130 | wait_queue_head_t open, wait_frame, wait_stream; | 133 | wait_queue_head_t wait_open, wait_frame, wait_stream; |
131 | }; | 134 | }; |
132 | 135 | ||
133 | /*****************************************************************************/ | 136 | /*****************************************************************************/ |