summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index ba9a7cff7..af6727e1b 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -170,8 +170,11 @@ static inline struct proc_dir_entry *proc_create(const char *a,
e = create_proc_entry(a, b, c);
if (e) {
e->owner = THIS_MODULE;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
e->proc_fops = d;
-
+#else
+ e->proc_fops = (struct file_operations *)d;
+#endif
}
return e;
}
@@ -189,7 +192,11 @@ static inline struct proc_dir_entry *proc_create_data(const char *a,
e = create_proc_entry(a, b, c);
if (e) {
e->owner = THIS_MODULE;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
e->proc_fops = d;
+#else
+ e->proc_fops = (struct file_operations *)d;
+#endif
e->data = f;
}
return e;
@@ -197,6 +204,10 @@ static inline struct proc_dir_entry *proc_create_data(const char *a,
#endif
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17)
+#define hweight64(x) generic_hweight64(x)
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
#define div64_u64(a,b) div64_64(a,b)