diff options
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/Makefile | 4 | ||||
-rw-r--r-- | v4l/compat.h | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/v4l/Makefile b/v4l/Makefile index b07b592b1..f08143def 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -102,8 +102,12 @@ EXTRA_CFLAGS += -g EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL) +# Make sure kernel's options are overridden by v4l-dvb options EXTRA_CFLAGS += -include $(obj)/config-compat.h +# Allow kernel version compat tests without adding #include's +EXTRA_CFLAGS += -include linux/version.h + ################################################# # Kernel 2.4/2.6 specific rules diff --git a/v4l/compat.h b/v4l/compat.h index ffe4e97a5..bdad519e9 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -5,23 +5,14 @@ #ifndef _COMPAT_H #define _COMPAT_H -#include <linux/i2c-id.h> -#include <linux/pm.h> -#include <linux/version.h> -#include <linux/utsname.h> -#include <linux/sched.h> - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18) # define minor(x) MINOR(x) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include <linux/delay.h> +# include <linux/delay.h> # define need_resched() (current->need_resched) - -#define work_struct tq_struct -#else -#include <linux/device.h> +# define work_struct tq_struct #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) @@ -58,6 +49,10 @@ # define PCI_D0 (0) # define assert_spin_locked(foobar) #endif + +/* Since v4l-dvb now includes it's own copy of linux/i2c-id.h these + are no longer necessary */ +/* #if !defined(I2C_ALGO_SAA7134) #define I2C_ALGO_SAA7134 I2C_HW_B_BT848 #endif @@ -70,10 +65,10 @@ #if !defined(I2C_HW_SAA7146) # define I2C_HW_SAA7146 I2C_ALGO_SAA7146 #endif - #if !defined(I2C_HW_B_EM2820) #define I2C_HW_B_EM2820 0x99 #endif +*/ #ifndef I2C_M_IGNORE_NAK # define I2C_M_IGNORE_NAK 0x1000 @@ -291,7 +286,7 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr) #define mutex_trylock(a) down_trylock(a) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(_LINUX_SCHED_H) static inline signed long __sched schedule_timeout_interruptible(signed long timeout) { @@ -327,7 +322,8 @@ static inline void setup_timer(struct timer_list * timer, turned on. We can not just include usb.h here, because there is a lot of code which will not compile if it has usb.h included, due to conflicts with symbol names. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(__LINUX_USB_H) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && \ + defined(__LINUX_USB_H) && defined(_INPUT_H) #include <linux/input.h> /* Found in linux/usb_input.h in 2.6.13 */ /* Moved to linux/usb/input.h in 2.6.18 */ |