diff options
author | Luca Risolia <luca.risolia@studio.unibo.it> | 2007-06-13 14:37:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 14:24:07 -0300 |
commit | 3770be34199ace8c497ce454cebd7d63347dc4c3 (patch) | |
tree | 4c9c3adef124a1400234a730a7ebca63c8ab63e3 /drivers/media/video/sn9c102/sn9c102.h | |
parent | a6e2b40cb430e1e3a22fbb56807edebf71bf6188 (diff) | |
download | op-kernel-dev-3770be34199ace8c497ce454cebd7d63347dc4c3.zip op-kernel-dev-3770be34199ace8c497ce454cebd7d63347dc4c3.tar.gz |
V4L/DVB (5765): SN9C1xx driver updates
- Add support for pair OV7630+SN9C120
- Better and safe locking mechanism of the device structure on open(),
close() and disconnect()
- Use kref for handling device deallocation
- Generic cleanups
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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 11fcb49..2e3c3de 100644 --- a/drivers/media/video/sn9c102/sn9c102.h +++ b/drivers/media/video/sn9c102/sn9c102.h @@ -36,6 +36,7 @@ #include <linux/mutex.h> #include <linux/string.h> #include <linux/stddef.h> +#include <linux/kref.h> #include "sn9c102_config.h" #include "sn9c102_sensor.h" @@ -94,7 +95,7 @@ struct sn9c102_module_param { }; static DEFINE_MUTEX(sn9c102_sysfs_lock); -static DECLARE_RWSEM(sn9c102_disconnect); +static DECLARE_RWSEM(sn9c102_dev_lock); struct sn9c102_device { struct video_device* v4ldev; @@ -122,12 +123,14 @@ struct sn9c102_device { struct sn9c102_module_param module_param; + struct kref kref; enum sn9c102_dev_state state; u8 users; - struct mutex dev_mutex, fileop_mutex; + struct completion probe; + struct mutex open_mutex, fileop_mutex; spinlock_t queue_lock; - wait_queue_head_t open, wait_frame, wait_stream; + wait_queue_head_t wait_open, wait_frame, wait_stream; }; /*****************************************************************************/ |