summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvideo/vicam.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/usbvideo/vicam.c')
-rw-r--r--linux/drivers/media/video/usbvideo/vicam.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/video/usbvideo/vicam.c b/linux/drivers/media/video/usbvideo/vicam.c
index 98cb58e89..0ae33d432 100644
--- a/linux/drivers/media/video/usbvideo/vicam.c
+++ b/linux/drivers/media/video/usbvideo/vicam.c
@@ -43,7 +43,9 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/proc_fs.h>
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
+#endif
#include "usbvideo.h"
// #define VICAM_DEBUG
@@ -409,7 +411,11 @@ struct vicam_camera {
struct usb_device *udev; // usb device
/* guard against simultaneous accesses to the camera */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex cam_lock;
+#else
+ struct semaphore cam_lock;
+#endif
int is_initialized;
u8 open_count;