diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-17 16:48:19 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-17 16:48:19 +0200 |
commit | 7b7b6e145e1bf05cdf3e5d82e8f30b288ad9e15a (patch) | |
tree | ecd9ae302f0c652aca56f7716b26d143c475b686 /v4l/compat.h | |
parent | 3d482117ca1f1846a019f59f91466eb5f3306671 (diff) | |
download | mediapointer-dvb-s2-7b7b6e145e1bf05cdf3e5d82e8f30b288ad9e15a.tar.gz mediapointer-dvb-s2-7b7b6e145e1bf05cdf3e5d82e8f30b288ad9e15a.tar.bz2 |
videodev/dabusb/dvbdev: fix 2.6.16 compilation
From: Hans Verkuil <hverkuil@xs4all.nl>
struct file_operations was made const in 2.6.17. Cast const away when compiling
under 2.6.16.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 13 |
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) |