diff options
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index ec43d8630..8df5afe2c 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -9,6 +9,11 @@ #define KERN_CONT "" #endif +/* To allow I2C compatibility code to work */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +#include <linux/i2c-dev.h> +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) # define set_freezable() #endif @@ -466,11 +471,9 @@ static inline unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate) } #endif -#ifndef task_pid_nr +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) # define task_pid_nr(current) ((current)->pid) -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) # define sg_init_table(a,b) # define sg_page(p) (sg->page) # define sg_set_page(sglist,pg,sz,off) \ |