summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/arv.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/arv.c')
-rw-r--r--linux/drivers/media/video/arv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/linux/drivers/media/video/arv.c b/linux/drivers/media/video/arv.c
index 0f578259e..0cd7f1d5e 100644
--- a/linux/drivers/media/video/arv.c
+++ b/linux/drivers/media/video/arv.c
@@ -30,7 +30,10 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
#include <linux/mutex.h>
+#endif
#include <asm/uaccess.h>
#include <asm/m32r.h>
@@ -116,7 +119,11 @@ struct ar_device {
int width, height;
int frame_bytes, line_bytes;
wait_queue_head_t wait;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
struct mutex lock;
+#else
+ struct semaphore lock;
+#endif
};
static int video_nr = -1; /* video device number (first free) */
@@ -126,8 +133,8 @@ static unsigned char yuv[MAX_AR_FRAME_BYTES];
/* default frequency */
#define DEFAULT_FREQ 50 /* 50 or 75 (MHz) is available as BCLK */
static int freq = DEFAULT_FREQ; /* BCLK: available 50 or 70 (MHz) */
-static int vga = 0; /* default mode(0:QVGA mode, other:VGA mode) */
-static int vga_interlace = 0; /* 0 is normal mode for, else interlace mode */
+static int vga; /* default mode(0:QVGA mode, other:VGA mode) */
+static int vga_interlace; /* 0 is normal mode for, else interlace mode */
module_param(freq, int, 0);
module_param(vga, int, 0);
module_param(vga_interlace, int, 0);