aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/media/w9968cf.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-11 15:55:29 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 14:49:55 -0800
commit4186ecf8ad16dd05759a09594de6a87e48759ba6 (patch)
tree3ee5292d9f4a36e3eb359b586289ec972bcbaf39 /drivers/usb/media/w9968cf.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/w9968cf.h')
-rw-r--r--drivers/usb/media/w9968cf.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/usb/media/w9968cf.h b/drivers/usb/media/w9968cf.h
index 47a6ff79417..a87be719a28 100644
--- a/drivers/usb/media/w9968cf.h
+++ b/drivers/usb/media/w9968cf.h
@@ -32,7 +32,7 @@
#include <linux/param.h>
#include <linux/types.h>
#include <linux/rwsem.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#include <media/ovcamchip.h>
@@ -194,14 +194,6 @@ enum w9968cf_vpp_flag {
VPP_UYVY_TO_RGBX = 0x08,
};
-static struct w9968cf_vpp_t* w9968cf_vpp;
-static DECLARE_WAIT_QUEUE_HEAD(w9968cf_vppmod_wait);
-
-static LIST_HEAD(w9968cf_dev_list); /* head of V4L registered cameras list */
-static DECLARE_MUTEX(w9968cf_devlist_sem); /* semaphore for list traversal */
-
-static DECLARE_RWSEM(w9968cf_disconnect); /* prevent races with open() */
-
/* Main device driver structure */
struct w9968cf_device {
struct device dev; /* device structure */
@@ -277,8 +269,8 @@ struct w9968cf_device {
struct i2c_client* sensor_client;
/* Locks */
- struct semaphore dev_sem, /* for probe, disconnect,open and close */
- fileop_sem; /* for read and ioctl */
+ struct mutex dev_mutex, /* for probe, disconnect,open and close */
+ fileop_mutex; /* for read and ioctl */
spinlock_t urb_lock, /* for submit_urb() and unlink_urb() */
flist_lock; /* for requested frame list accesses */
wait_queue_head_t open, wait_queue;