diff options
Diffstat (limited to 'linux/include/media')
-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 | 8 | ||||
-rw-r--r-- | linux/include/media/v4l2-i2c-drv-legacy.h | 24 | ||||
-rw-r--r-- | linux/include/media/v4l2-i2c-drv.h | 24 | ||||
-rw-r--r-- | linux/include/media/videobuf-core.h | 4 | ||||
-rw-r--r-- | linux/include/media/videobuf-dvb.h | 4 |
7 files changed, 0 insertions, 93 deletions
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 fb356eb57..aa0fd8c94 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -15,11 +15,7 @@ #include <linux/poll.h> #include <linux/fs.h> #include <linux/device.h> -#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> @@ -359,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 */ diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index 738f87454..31d6e103c 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -77,19 +77,11 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) return 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); @@ -97,15 +89,11 @@ 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); @@ -117,16 +105,8 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) /* i2c implementation */ static struct i2c_driver v4l2_i2c_driver_legacy = { -#if 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 .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, @@ -166,11 +146,7 @@ static int __init v4l2_i2c_drv_init(void) if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#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 f74c8a64a..9333e56b3 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -111,19 +111,11 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) return 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); @@ -131,15 +123,11 @@ 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); @@ -150,16 +138,8 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) /* ----------------------------------------------------------------------- */ static struct i2c_driver v4l2_i2c_driver = { -#if 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 .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, @@ -180,11 +160,7 @@ static int __init v4l2_i2c_drv_init(void) if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#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 84886be5e..b77748696 100644 --- a/linux/include/media/videobuf-dvb.h +++ b/linux/include/media/videobuf-dvb.h @@ -11,11 +11,7 @@ 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; |