diff options
Diffstat (limited to 'linux/include')
-rw-r--r-- | linux/include/asm-arm/arch-pxa/pxa-regs.h | 12 | ||||
-rw-r--r-- | linux/include/linux/i2c-id.h | 8 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 4 | ||||
-rw-r--r-- | linux/include/media/pwc-ioctl.h | 7 | ||||
-rw-r--r-- | linux/include/media/saa7146.h | 23 | ||||
-rw-r--r-- | linux/include/media/v4l2-common.h | 6 | ||||
-rw-r--r-- | linux/include/media/v4l2-dev.h | 23 | ||||
-rw-r--r-- | linux/include/media/v4l2-i2c-drv-legacy.h | 50 | ||||
-rw-r--r-- | linux/include/media/v4l2-i2c-drv.h | 50 | ||||
-rw-r--r-- | linux/include/media/videobuf-core.h | 4 | ||||
-rw-r--r-- | linux/include/media/videobuf-dvb.h | 8 |
11 files changed, 11 insertions, 184 deletions
diff --git a/linux/include/asm-arm/arch-pxa/pxa-regs.h b/linux/include/asm-arm/arch-pxa/pxa-regs.h index 4b2ea1e95..a288ae8c7 100644 --- a/linux/include/asm-arm/arch-pxa/pxa-regs.h +++ b/linux/include/asm-arm/arch-pxa/pxa-regs.h @@ -46,13 +46,13 @@ #define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */ #define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */ -#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \ - (0x20000000 + (Nb)*PCMCIASp) +#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \ + (0x20000000 + (Nb)*PCMCIASp) #define _PCMCIAIO(Nb) _PCMCIA (Nb) /* PCMCIA I/O [0..1] */ -#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \ - (_PCMCIA (Nb) + 2*PCMCIAPrtSp) -#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \ - (_PCMCIA (Nb) + 3*PCMCIAPrtSp) +#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \ + (_PCMCIA (Nb) + 2*PCMCIAPrtSp) +#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \ + (_PCMCIA (Nb) + 3*PCMCIAPrtSp) #define _PCMCIA0 _PCMCIA (0) /* PCMCIA 0 */ #define _PCMCIA0IO _PCMCIAIO (0) /* PCMCIA 0 I/O */ diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h index 580acc939..3db09bc06 100644 --- a/linux/include/linux/i2c-id.h +++ b/linux/include/linux/i2c-id.h @@ -33,15 +33,11 @@ #define I2C_DRIVERID_MSP3400 1 #define I2C_DRIVERID_TUNER 2 -#define I2C_DRIVERID_TDA8425 4 /* stereo sound processor */ #define I2C_DRIVERID_TEA6420 5 /* audio matrix switch */ #define I2C_DRIVERID_TEA6415C 6 /* video matrix switch */ #define I2C_DRIVERID_TDA9840 7 /* stereo sound processor */ #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ -#define I2C_DRIVERID_TEA6300 18 /* audio mixer */ -#define I2C_DRIVERID_TDA9850 20 /* audio mixer */ -#define I2C_DRIVERID_TDA9855 21 /* audio mixer */ #define I2C_DRIVERID_SAA7110 22 /* video decoder */ #define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */ #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ @@ -50,9 +46,7 @@ #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ #define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */ #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ -#define I2C_DRIVERID_TDA9873 31 /* TV sound decoder chip */ #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ -#define I2C_DRIVERID_PIC16C54_PV9 33 /* Audio mux/ir receiver */ #define I2C_DRIVERID_BT819 40 /* video decoder */ #define I2C_DRIVERID_BT856 41 /* video encoder */ #define I2C_DRIVERID_VPX3220 42 /* video decoder+vbi/vtxt */ @@ -63,7 +57,6 @@ #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ -#define I2C_DRIVERID_TDA9874 66 /* TV sound decoder */ #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ #define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ @@ -161,7 +154,6 @@ #define I2C_HW_SMBUS_W9968CF 0x04000d #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ -#define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ #define I2C_HW_SMBUS_ALI1563 0x040013 diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index c6cffb912..e92b53dd0 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -310,6 +310,7 @@ struct v4l2_pix_format /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ +#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G','B','R','G') /* 8 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */ /* compressed formats */ @@ -324,6 +325,9 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ +#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S','5','0','1') /* YUYV per line */ +#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S','5','6','1') /* compressed GBRG bayer */ +#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P','2','0','7') /* compressed BGGR bayer */ /* * F O R M A T E N U M E R A T I O N diff --git a/linux/include/media/pwc-ioctl.h b/linux/include/media/pwc-ioctl.h index 6e32ef4e2..0f19779c4 100644 --- a/linux/include/media/pwc-ioctl.h +++ b/linux/include/media/pwc-ioctl.h @@ -55,12 +55,7 @@ #include <linux/types.h> #include <linux/version.h> -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 10) -/* Compatibility for older kernel */ -typedef __u16 __le16; -#endif - - /* Enumeration of image sizes */ +/* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 #define PSZ_QSIF 0x01 #define PSZ_QCIF 0x02 diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index e4a7aa2aa..daed75624 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -12,9 +12,7 @@ #include <asm/io.h> /* for accessing devices */ #include <linux/stringify.h> #include "compat.h" -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include <linux/mutex.h> -#endif #include <linux/scatterlist.h> #include <linux/vmalloc.h> /* for vmalloc() */ @@ -27,23 +25,14 @@ extern unsigned int saa7146_debug; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) -//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),__stringify(KBUILD_MODNAME),__FUNCTION__) -#else //#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__FUNCTION__) -#endif #ifndef DEBUG_VARIABLE #define DEBUG_VARIABLE saa7146_debug #endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) -#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__) -#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; } -#else #define DEBUG_PROLOG printk("%s: %s(): ",KBUILD_MODNAME,__FUNCTION__) #define INFO(x) { printk("%s: ",KBUILD_MODNAME); printk x; } -#endif #define ERR(x) { DEBUG_PROLOG; printk x; } @@ -124,11 +113,7 @@ struct saa7146_dev /* different device locks */ spinlock_t slock; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; -#else - struct semaphore lock; -#endif unsigned char __iomem *mem; /* pointer to mapped IO memory */ u32 revision; /* chip revision; needed for bug-workarounds*/ @@ -149,11 +134,7 @@ struct saa7146_dev void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); /* i2c-stuff */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex i2c_lock; -#else - struct semaphore i2c_lock; -#endif u32 i2c_bitrate; struct saa7146_dma d_i2c; /* pointer to i2c memory */ @@ -170,11 +151,7 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c /* from saa7146_core.c */ extern struct list_head saa7146_devices; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) extern struct mutex saa7146_devices_lock; -#else -extern struct semaphore saa7146_devices_lock; -#endif int saa7146_register_extension(struct saa7146_extension*); int saa7146_unregister_extension(struct saa7146_extension*); struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 47cc48ea9..020d05758 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -40,15 +40,9 @@ #define v4l_printk(level, name, adapter, addr, fmt, arg...) \ printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg) -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) -#define v4l_client_printk(level, client, fmt, arg...) \ - v4l_printk(level, (client)->driver->name, (client)->adapter, \ - (client)->addr, fmt , ## arg) -#else #define v4l_client_printk(level, client, fmt, arg...) \ v4l_printk(level, (client)->driver->driver.name, (client)->adapter, \ (client)->addr, fmt , ## arg) -#endif #define v4l_err(client, fmt, arg...) \ v4l_client_printk(KERN_ERR, client, fmt , ## arg) diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index d1ca9664e..aa0fd8c94 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -14,14 +14,8 @@ #include <linux/poll.h> #include <linux/fs.h> -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include <linux/device.h> -#endif -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include <linux/mutex.h> -#else -#include <asm/semaphore.h> -#endif #include <linux/compiler.h> /* need __user */ #ifdef CONFIG_VIDEO_V4L1_COMPAT #include <linux/videodev.h> @@ -97,15 +91,9 @@ struct video_device struct file_operations *fops; #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) /* sysfs */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) struct device class_dev; /* v4l device */ -#else - struct class_device class_dev; -#endif struct device *dev; /* device parent */ -#endif /* device info */ char name[32]; @@ -367,11 +355,7 @@ void *priv; /* for videodev.c intenal usage -- please don't touch */ int users; /* video_exclusive_{open|close} ... */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; /* ... helper function uses these */ -#else - struct semaphore lock; /* ... helper function uses these */ -#endif }; /* Class-dev to video-device */ @@ -399,15 +383,9 @@ extern int video_usercopy(struct inode *inode, struct file *file, #ifdef CONFIG_VIDEO_V4L1_COMPAT #include <linux/mm.h> -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) static inline int __must_check -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -video_device_create_file(struct video_device *vfd, - struct class_device_attribute *attr) -#else video_device_create_file(struct video_device *vfd, struct device_attribute *attr) -#endif { int ret = device_create_file(&vfd->class_dev, attr); if (ret < 0) @@ -420,7 +398,6 @@ video_device_remove_file(struct video_device *vfd, { device_remove_file(&vfd->class_dev, attr); } -#endif #endif /* CONFIG_VIDEO_V4L1_COMPAT */ diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index e95e2a072..31d6e103c 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -30,11 +30,7 @@ struct v4l2_i2c_driver_data { int (*suspend)(struct i2c_client *client, pm_message_t state); int (*resume)(struct i2c_client *client); int (*legacy_probe)(struct i2c_adapter *adapter); -#ifdef I2C_CLASS_TV_ANALOG int legacy_class; -#else - int legacy_id; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) const struct i2c_device_id *id_table; #endif @@ -49,12 +45,7 @@ static struct i2c_client_address_data addr_data; static struct i2c_driver v4l2_i2c_driver_legacy; static char v4l2_i2c_drv_name_legacy[32]; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind) -#else -static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind) -#endif { return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver_legacy, v4l2_i2c_drv_name_legacy, v4l2_i2c_data.probe); @@ -67,11 +58,7 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter) return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } -#ifdef I2C_CLASS_TV_ANALOG if (adapter->class & v4l2_i2c_data.legacy_class) -#else - if (adapter->id == v4l2_i2c_data.legacy_id) -#endif return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } @@ -87,27 +74,14 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) if (err) return err; kfree(client); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) #else static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state) #endif -#else -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13) -static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state, u32 level) -#else -static int v4l2_i2c_drv_suspend_helper(struct device * dev, u32 state, u32 level) -#endif -#endif { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); @@ -115,44 +89,29 @@ static int v4l2_i2c_drv_suspend_helper(struct device * dev, u32 state, u32 level return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_resume_helper(struct i2c_client *client) #else static int v4l2_i2c_drv_resume_helper(struct device * dev) #endif -#else -static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) -#endif { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; } -#endif /* ----------------------------------------------------------------------- */ /* i2c implementation */ static struct i2c_driver v4l2_i2c_driver_legacy = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) - .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - .flags = I2C_DF_NOTIFY, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .driver = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, #endif }, -#endif .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) @@ -184,19 +143,10 @@ static int __init v4l2_i2c_drv_init(void) strlcpy(v4l2_i2c_drv_name_legacy, v4l2_i2c_data.name, sizeof(v4l2_i2c_drv_name_legacy)); strlcat(v4l2_i2c_drv_name_legacy, "'", sizeof(v4l2_i2c_drv_name_legacy)); -#ifdef I2C_CLASS_TV_ANALOG if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#else - if (v4l2_i2c_data.legacy_id == 0) - v4l2_i2c_data.legacy_id = I2C_HW_B_BT848; -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - strlcpy(v4l2_i2c_driver_legacy.name, v4l2_i2c_drv_name_legacy, sizeof(v4l2_i2c_driver_legacy.name)); -#else v4l2_i2c_driver_legacy.driver.name = v4l2_i2c_drv_name_legacy; -#endif v4l2_i2c_driver_legacy.id = v4l2_i2c_data.driverid; v4l2_i2c_driver_legacy.command = v4l2_i2c_data.command; err = i2c_add_driver(&v4l2_i2c_driver_legacy); diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 73d713f07..9333e56b3 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -35,11 +35,7 @@ struct v4l2_i2c_driver_data { int (*suspend)(struct i2c_client *client, pm_message_t state); int (*resume)(struct i2c_client *client); int (*legacy_probe)(struct i2c_adapter *adapter); -#ifdef I2C_CLASS_TV_ANALOG int legacy_class; -#else - int legacy_id; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) const struct i2c_device_id *id_table; #endif @@ -83,12 +79,7 @@ static struct i2c_client_address_data addr_data; /* Bus-based I2C API is not present, add legacy code */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind) -#else -static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind) -#endif { return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver, v4l2_i2c_data.name, v4l2_i2c_data.probe); @@ -101,11 +92,7 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter) return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } -#ifdef I2C_CLASS_TV_ANALOG if (adapter->class & v4l2_i2c_data.legacy_class) -#else - if (adapter->id == v4l2_i2c_data.legacy_id) -#endif return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); return 0; } @@ -121,27 +108,14 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) if (err) return err; kfree(client); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) #else static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state) #endif -#else -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13) -static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state, u32 level) -#else -static int v4l2_i2c_drv_suspend_helper(struct device * dev, u32 state, u32 level) -#endif -#endif { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); @@ -149,43 +123,28 @@ static int v4l2_i2c_drv_suspend_helper(struct device * dev, u32 state, u32 level return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_resume_helper(struct i2c_client *client) #else static int v4l2_i2c_drv_resume_helper(struct device * dev) #endif -#else -static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) -#endif { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; } -#endif /* ----------------------------------------------------------------------- */ static struct i2c_driver v4l2_i2c_driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) - .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - .flags = I2C_DF_NOTIFY, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .driver = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, #endif }, -#endif .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) @@ -198,19 +157,10 @@ static struct i2c_driver v4l2_i2c_driver = { static int __init v4l2_i2c_drv_init(void) { -#ifdef I2C_CLASS_TV_ANALOG if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#else - if (v4l2_i2c_data.legacy_id == 0) - v4l2_i2c_data.legacy_id = I2C_HW_B_BT848; -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - strlcpy(v4l2_i2c_driver.name, v4l2_i2c_data.name, sizeof(v4l2_i2c_driver.name)); -#else v4l2_i2c_driver.driver.name = v4l2_i2c_data.name; -#endif v4l2_i2c_driver.id = v4l2_i2c_data.driverid; v4l2_i2c_driver.command = v4l2_i2c_data.command; return i2c_add_driver(&v4l2_i2c_driver); diff --git a/linux/include/media/videobuf-core.h b/linux/include/media/videobuf-core.h index a2f55ff24..874f1340d 100644 --- a/linux/include/media/videobuf-core.h +++ b/linux/include/media/videobuf-core.h @@ -153,11 +153,7 @@ struct videobuf_qtype_ops { }; struct videobuf_queue { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex vb_lock; -#else - struct semaphore vb_lock; -#endif spinlock_t *irqlock; struct device *dev; diff --git a/linux/include/media/videobuf-dvb.h b/linux/include/media/videobuf-dvb.h index 14438bc98..b77748696 100644 --- a/linux/include/media/videobuf-dvb.h +++ b/linux/include/media/videobuf-dvb.h @@ -11,20 +11,12 @@ struct videobuf_dvb { struct videobuf_queue dvbq; /* video-buf-dvb state info */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; -#else - struct semaphore lock; -#endif struct task_struct *thread; int nfeeds; /* videobuf_dvb_(un)register manges this */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) struct dvb_adapter adapter; -#else - struct dvb_adapter *adapter; -#endif struct dvb_demux demux; struct dmxdev dmxdev; struct dmx_frontend fe_hw; |