summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 10:22:11 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 10:22:11 -0300
commit10e384975bebb47df8288097f7c75b59b573dd43 (patch)
tree7c059f457b7a2f5a23294e6a52c85232e2e56f16 /linux/drivers
parenta169d494ae94e8dd1cffe12599a9403b07c565e4 (diff)
downloadmediapointer-dvb-s2-10e384975bebb47df8288097f7c75b59b573dd43.tar.gz
mediapointer-dvb-s2-10e384975bebb47df8288097f7c75b59b573dd43.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')
-rw-r--r--linux/drivers/media/video/vivi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c
index df23a20cd..bd418e590 100644
--- a/linux/drivers/media/video/vivi.c
+++ b/linux/drivers/media/video/vivi.c
@@ -25,7 +25,11 @@
#include <linux/pci.h>
#include <linux/random.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 "compat.h"
#include <linux/videodev2.h>
#include <linux/dma-mapping.h>
@@ -178,7 +182,11 @@ static LIST_HEAD(vivi_devlist);
struct vivi_dev {
struct list_head vivi_devlist;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex lock;
+#else
+ struct semaphore lock;
+#endif
int users;