summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-10-20 19:27:46 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-10-20 19:27:46 +0000
commitd1669206c04cdc1237a24e87f2fec6a34ef0571f (patch)
tree1248266ddfc82be1436866366ccf915c4accb837
parent92819d79c592b203774f28e4aac6d2d3f9742b89 (diff)
downloadmediapointer-dvb-s2-d1669206c04cdc1237a24e87f2fec6a34ef0571f.tar.gz
mediapointer-dvb-s2-d1669206c04cdc1237a24e87f2fec6a34ef0571f.tar.bz2
* ../v4l/compat.h:
Fix build of em driver with 2.6.8 kernel. Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
-rw-r--r--v4l/ChangeLog8
-rw-r--r--v4l/compat.h32
2 files changed, 39 insertions, 1 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index f27995188..c08454aa5 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,11 @@
+2005-10-20 19:27 nshmyrev
+
+ * ../v4l/compat.h:
+
+ Fix build of em driver with 2.6.8 kernel.
+
+ Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
2005-10-20 18:55 mkrufky
* ../linux/Documentation/video4linux/CARDLIST.saa7134:
diff --git a/v4l/compat.h b/v4l/compat.h
index bb2f0954a..46f3ec822 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -1,5 +1,5 @@
/*
- * $Id: compat.h,v 1.25 2005/10/14 16:31:51 mchehab Exp $
+ * $Id: compat.h,v 1.26 2005/10/20 19:27:46 nsh Exp $
*/
#ifndef _COMPAT_H
@@ -187,6 +187,36 @@ static inline unsigned long msleep_interruptible(unsigned int msecs)
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+#include <linux/mm.h>
+static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
+{
+ return page_to_pfn(vmalloc_to_page(vmalloc_addr));
+}
+
+#define wait_event_timeout(wq, condition, timeout) \
+({ \
+ long __ret = timeout; \
+ if (!(condition)) \
+ do { \
+ DEFINE_WAIT(__wait); \
+ for (;;) { \
+ prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ __ret = schedule_timeout(__ret); \
+ if (!__ret) \
+ break; \
+ } \
+ finish_wait(&wq, &__wait); \
+ } while (0); \
+ __ret; \
+})
+
+#define remap_pfn_range remap_page_range
+
+#endif
+
#endif
/*
* Local variables: