summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pwc
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 10:16:33 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 10:16:33 -0300
commit04f6a995bc0c07f164f119b36667d1dab1cdaafd (patch)
treef819b0d3ac1754c6c461714f2974027a6771571d /linux/drivers/media/video/pwc
parent8b087580996cb46c313a9c5559780ff134dcc155 (diff)
downloadmediapointer-dvb-s2-04f6a995bc0c07f164f119b36667d1dab1cdaafd.tar.gz
mediapointer-dvb-s2-04f6a995bc0c07f164f119b36667d1dab1cdaafd.tar.bz2
Backport mutex changes to work with kernels <=2.6.15
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/pwc')
-rw-r--r--linux/drivers/media/video/pwc/pwc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pwc/pwc.h b/linux/drivers/media/video/pwc/pwc.h
index 910a04f53..0c77c3019 100644
--- a/linux/drivers/media/video/pwc/pwc.h
+++ b/linux/drivers/media/video/pwc/pwc.h
@@ -31,7 +31,11 @@
#include <linux/wait.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
+#else
+#include <asm/semaphore.h>
+#endif
#include <asm/errno.h>
#include <linux/videodev.h>
#include <media/v4l2-common.h>
@@ -244,7 +248,11 @@ struct pwc_device
int image_read_pos; /* In case we read data in pieces, keep track of were we are in the imagebuffer */
int image_used[MAX_IMAGES]; /* For MCAPTURE and SYNC */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex modlock; /* to prevent races in video_open(), etc */
+#else
+ struct semaphore modlock; /* to prevent races in video_open(), etc */
+#endif
spinlock_t ptrlock; /* for manipulating the buffer pointers */
/*** motorized pan/tilt feature */