summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index ae34380e0..9918f2e46 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -249,6 +249,11 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#endif
#endif
+/* The class_device system didn't appear until 2.5.69 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#define class_device_create_file(a, b) (0)
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
# define class_device_create(a, b, c, d, e, f, g, h) class_simple_device_add(a, c, d, e, f, g, h)
# define class_device_destroy(a, b) class_simple_device_remove(b)
@@ -274,6 +279,20 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#define mutex_trylock(a) down_trylock(a)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+static inline signed long __sched
+schedule_timeout_interruptible(signed long timeout)
+{
+ __set_current_state(TASK_INTERRUPTIBLE);
+ return schedule_timeout(timeout);
+}
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+#define IRQF_SHARED SA_SHIRQ
+#define IRQF_DISABLED SA_INTERRUPT
+#endif
+
#endif
/*
* Local variables: