aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/media/usbvideo.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/usbvideo.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/usbvideo.h')
-rw-r--r--drivers/usb/media/usbvideo.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/media/usbvideo.h b/drivers/usb/media/usbvideo.h
index 6c390a1f981..135433c2680 100644
--- a/drivers/usb/media/usbvideo.h
+++ b/drivers/usb/media/usbvideo.h
@@ -19,6 +19,7 @@
#include <linux/config.h>
#include <linux/videodev.h>
#include <linux/usb.h>
+#include <linux/mutex.h>
/* Most helpful debugging aid */
#define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__))))
@@ -213,7 +214,7 @@ struct uvd {
unsigned long flags; /* FLAGS_USBVIDEO_xxx */
unsigned long paletteBits; /* Which palettes we accept? */
unsigned short defaultPalette; /* What palette to use for read() */
- struct semaphore lock;
+ struct mutex lock;
int user; /* user count for exclusive use */
videosize_t videosize; /* Current setting */
@@ -272,7 +273,7 @@ struct usbvideo {
int num_cameras; /* As allocated */
struct usb_driver usbdrv; /* Interface to the USB stack */
char drvName[80]; /* Driver name */
- struct semaphore lock; /* Mutex protecting camera structures */
+ struct mutex lock; /* Mutex protecting camera structures */
struct usbvideo_cb cb; /* Table of callbacks (virtual methods) */
struct video_device vdt; /* Video device template */
struct uvd *cam; /* Array of camera structures */