diff options
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 6e9f5091f..27153b9b0 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -1,5 +1,5 @@ /* - * $Id: compat.h,v 1.21 2005/10/06 14:38:52 mchehab Exp $ + * $Id: compat.h,v 1.22 2005/10/09 18:07:06 mchehab Exp $ */ #ifndef _COMPAT_H @@ -16,7 +16,10 @@ #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <linux/delay.h> # define need_resched() (current->need_resched) + +#define work_struct tq_struct #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) @@ -53,6 +56,9 @@ # define PCI_D0 (0) # define assert_spin_locked(foobar) #endif +#if !defined(I2C_ALGO_SAA7134) +#define I2C_ALGO_SAA7134 I2C_HW_B_BT848 +#endif #if !defined(I2C_HW_B_CX2388x) # define I2C_HW_B_CX2388x I2C_HW_B_BT848 #endif @@ -67,11 +73,15 @@ #define I2C_HW_B_EM2820 I2C_HW_B_BT848 #endif +#ifndef I2C_M_IGNORE_NAK +# define I2C_M_IGNORE_NAK 0x1000 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) #define __le32 __u32 #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)) static inline unsigned long msecs_to_jiffies(const unsigned int m) { #if HZ <= 1000 && !(1000 % HZ) @@ -100,7 +110,6 @@ static inline void msleep(unsigned int msecs) timeout = schedule_timeout(timeout); } } -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) static inline unsigned long msleep_interruptible(unsigned int msecs) @@ -114,7 +123,7 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) return jiffies_to_msecs(timeout); } #endif - +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) #define pm_message_t u32 #endif @@ -126,6 +135,28 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) #endif #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#define KEY_NEXT 0x197 +#define KEY_RADIO 0x181 +#define KEY_PREVIOUS 0x19c +#define KEY_MHP 0x16f +#define KEY_EPG 0x16d +#define KEY_FASTFORWARD 208 +#define KEY_LIST 0x18b +#define KEY_LAST 0x195 +#define KEY_CLEAR 0x163 +#define KEY_AUX 0x186 +#define KEY_SCREEN 0x177 +#define KEY_MEDIA 226 +#define KEY_SLOW 0x199 +#define KEY_OK 0x160 +#define KEY_DIGITS 0x19d + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +#endif + #endif /* * Local variables: |