diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-24 11:09:17 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-24 11:09:17 -0300 |
commit | 00ae040d86fe4250f09667bacd62bad2bd970090 (patch) | |
tree | 21060857bd52216afd6be2cd668cf2ef3e3b529b /linux/drivers/media/video/usbvideo | |
parent | 6f290f63b3a7cd010a4bedcd36932b18617b34bb (diff) | |
download | mediapointer-dvb-s2-00ae040d86fe4250f09667bacd62bad2bd970090.tar.gz mediapointer-dvb-s2-00ae040d86fe4250f09667bacd62bad2bd970090.tar.bz2 |
Fix compilation for sn9c102 on older kernels
From: reinhard schwab <reinhard.schwab@aon.at>
Signed-off-by: Reinhard Schwab <reinhard.schwab@aon.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/usbvideo')
-rw-r--r-- | linux/drivers/media/video/usbvideo/usbvideo.h | 10 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvideo/vicam.c | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.h b/linux/drivers/media/video/usbvideo/usbvideo.h index 0d2066b7d..de266e78a 100644 --- a/linux/drivers/media/video/usbvideo/usbvideo.h +++ b/linux/drivers/media/video/usbvideo/usbvideo.h @@ -20,7 +20,9 @@ #include "compat.h" #include <linux/videodev.h> #include <linux/usb.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include <linux/mutex.h> +#endif /* Most helpful debugging aid */ #define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__)))) @@ -215,7 +217,11 @@ struct uvd { unsigned long flags; /* FLAGS_USBVIDEO_xxx */ unsigned long paletteBits; /* Which palettes we accept? */ unsigned short defaultPalette; /* What palette to use for read() */ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; +#else + struct semaphore lock; +#endif int user; /* user count for exclusive use */ videosize_t videosize; /* Current setting */ @@ -274,7 +280,11 @@ struct usbvideo { int num_cameras; /* As allocated */ struct usb_driver usbdrv; /* Interface to the USB stack */ char drvName[80]; /* Driver name */ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; /* Mutex protecting camera structures */ +#else + struct semaphore lock; +#endif struct usbvideo_cb cb; /* Table of callbacks (virtual methods) */ struct video_device vdt; /* Video device template */ struct uvd *cam; /* Array of camera structures */ 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; |