summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-08 00:19:19 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-07-08 00:19:19 +0200
commit7ce87336c2f386ab6c35e985a5832d21b5cd7fab (patch)
tree13562d693161dbaef976462e0f777fd49f4f8bf1 /linux/include
parent64a2df85368a26eafb15272ae2ba0fc556fbae21 (diff)
downloadmediapointer-dvb-s2-7ce87336c2f386ab6c35e985a5832d21b5cd7fab.tar.gz
mediapointer-dvb-s2-7ce87336c2f386ab6c35e985a5832d21b5cd7fab.tar.bz2
v4l-dvb: remove support for kernels < 2.6.0
From: Hans Verkuil <hverkuil@xs4all.nl> First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/v4l2-dev.h6
-rw-r--r--linux/include/media/v4l2-i2c-drv-legacy.h15
-rw-r--r--linux/include/media/v4l2-i2c-drv.h15
3 files changed, 2 insertions, 34 deletions
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index d1ca9664e..178989285 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -14,9 +14,7 @@
#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
@@ -97,7 +95,6 @@ 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 */
@@ -105,7 +102,6 @@ struct video_device
struct class_device class_dev;
#endif
struct device *dev; /* device parent */
-#endif
/* device info */
char name[32];
@@ -399,7 +395,6 @@ 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,
@@ -420,7 +415,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..f8172f3d6 100644
--- a/linux/include/media/v4l2-i2c-drv-legacy.h
+++ b/linux/include/media/v4l2-i2c-drv-legacy.h
@@ -49,12 +49,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);
@@ -87,14 +82,9 @@ 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)
@@ -130,19 +120,17 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level)
#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))
+#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
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
@@ -152,7 +140,6 @@ static struct i2c_driver v4l2_i2c_driver_legacy = {
.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)
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h
index 73d713f07..86b575200 100644
--- a/linux/include/media/v4l2-i2c-drv.h
+++ b/linux/include/media/v4l2-i2c-drv.h
@@ -83,12 +83,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);
@@ -121,14 +116,9 @@ 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)
@@ -164,18 +154,16 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level)
#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))
+#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
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
@@ -185,7 +173,6 @@ static struct i2c_driver v4l2_i2c_driver = {
.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)