diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-26 05:47:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-26 05:47:42 -0300 |
commit | d1c3ce25c000fa72c7bfb3b42d88bfbe4f5e37fa (patch) | |
tree | 551d1ce9ed77fcb5b2763cd8f606b46a043de386 /v4l/compat.h | |
parent | 6324f3b71dfb070913efba2306010ae2e0a1df11 (diff) | |
parent | e768886b19cdc2ba666bd52faa7797ff4151ced7 (diff) | |
download | mediapointer-dvb-s2-d1c3ce25c000fa72c7bfb3b42d88bfbe4f5e37fa.tar.gz mediapointer-dvb-s2-d1c3ce25c000fa72c7bfb3b42d88bfbe4f5e37fa.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/sms1xxx
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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) |