summaryrefslogtreecommitdiff
path: root/linux/include/media/v4l2-i2c-drv-legacy.h
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/media/v4l2-i2c-drv-legacy.h
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/media/v4l2-i2c-drv-legacy.h')
-rw-r--r--linux/include/media/v4l2-i2c-drv-legacy.h15
1 files changed, 1 insertions, 14 deletions
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)