diff options
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index ba9a7cff7..5e46c8271 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -114,6 +114,9 @@ do { \ p->length = sz; \ p->offset = off; \ } while (0) + +#define pr_err(fmt, arg...) \ + printk(KERN_ERR fmt, ##arg) #endif #ifndef BIT_MASK @@ -170,8 +173,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 +195,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 +207,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) |