aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/media/sn9c102.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-11 09:55:29 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:55 -0500
commit4186ecf8ad16dd05759a09594de6a87e48759ba6 (patch)
tree3ee5292d9f4a36e3eb359b586289ec972bcbaf39 /drivers/usb/media/sn9c102.h
parent35cce732d9d4d9af6b4ad4d26d8f8c0eddb573a2 (diff)
[PATCH] USB: convert a bunch of USB semaphores to mutexes
the patch below converts a bunch of semaphores-used-as-mutex in the USB code to mutexes Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/media/sn9c102.h')
-rw-r--r--drivers/usb/media/sn9c102.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/media/sn9c102.h b/drivers/usb/media/sn9c102.h
index 17d60c1eea7e..59e44be27cb4 100644
--- a/drivers/usb/media/sn9c102.h
+++ b/drivers/usb/media/sn9c102.h
@@ -33,6 +33,7 @@
33#include <linux/types.h> 33#include <linux/types.h>
34#include <linux/param.h> 34#include <linux/param.h>
35#include <linux/rwsem.h> 35#include <linux/rwsem.h>
36#include <linux/mutex.h>
36#include <asm/semaphore.h> 37#include <asm/semaphore.h>
37 38
38#include "sn9c102_sensor.h" 39#include "sn9c102_sensor.h"
@@ -109,7 +110,7 @@ struct sn9c102_module_param {
109 u8 force_munmap; 110 u8 force_munmap;
110}; 111};
111 112
112static DECLARE_MUTEX(sn9c102_sysfs_lock); 113static DEFINE_MUTEX(sn9c102_sysfs_lock);
113static DECLARE_RWSEM(sn9c102_disconnect); 114static DECLARE_RWSEM(sn9c102_disconnect);
114 115
115struct sn9c102_device { 116struct sn9c102_device {
@@ -141,7 +142,7 @@ struct sn9c102_device {
141 enum sn9c102_dev_state state; 142 enum sn9c102_dev_state state;
142 u8 users; 143 u8 users;
143 144
144 struct semaphore dev_sem, fileop_sem; 145 struct mutex dev_mutex, fileop_mutex;
145 spinlock_t queue_lock; 146 spinlock_t queue_lock;
146 wait_queue_head_t open, wait_frame, wait_stream; 147 wait_queue_head_t open, wait_frame, wait_stream;
147}; 148};