summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/sn9c102/sn9c102.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-06-13 14:37:50 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-06-13 14:37:50 -0300
commit86beca113bbe666cd0630a4ad8d45e6e49b5cc8b (patch)
treee07fd933768dc23e87c70e7e7c0d73ad740636db /linux/drivers/media/video/sn9c102/sn9c102.h
parent0e580200519552834546a8d4e5448410d7630810 (diff)
downloadmediapointer-dvb-s2-86beca113bbe666cd0630a4ad8d45e6e49b5cc8b.tar.gz
mediapointer-dvb-s2-86beca113bbe666cd0630a4ad8d45e6e49b5cc8b.tar.bz2
SN9C1xx driver updates
From: Luca Risolia <luca.risolia@studio.unibo.it> - 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 'linux/drivers/media/video/sn9c102/sn9c102.h')
-rw-r--r--linux/drivers/media/video/sn9c102/sn9c102.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/linux/drivers/media/video/sn9c102/sn9c102.h b/linux/drivers/media/video/sn9c102/sn9c102.h
index 4561c294f..e845e2dea 100644
--- a/linux/drivers/media/video/sn9c102/sn9c102.h
+++ b/linux/drivers/media/video/sn9c102/sn9c102.h
@@ -38,6 +38,7 @@
#endif
#include <linux/string.h>
#include <linux/stddef.h>
+#include <linux/kref.h>
#include "compat.h"
#include "sn9c102_config.h"
@@ -97,7 +98,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;
@@ -125,16 +126,18 @@ struct sn9c102_device {
struct sn9c102_module_param module_param;
+ struct kref kref;
enum sn9c102_dev_state state;
u8 users;
+ struct completion probe;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
- struct mutex dev_mutex, fileop_mutex;
+ struct mutex open_mutex, fileop_mutex;
#else
- struct semaphore dev_mutex, fileop_mutex;
+ struct semaphore open_mutex, fileop_mutex;
#endif
spinlock_t queue_lock;
- wait_queue_head_t open, wait_frame, wait_stream;
+ wait_queue_head_t wait_open, wait_frame, wait_stream;
};
/*****************************************************************************/