summaryrefslogtreecommitdiff
path: root/v4l_experimental
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 /v4l_experimental
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 'v4l_experimental')
-rw-r--r--v4l_experimental/dpl3518.c12
-rw-r--r--v4l_experimental/v3tv/v3tv.c41
-rw-r--r--v4l_experimental/v3tv/vpx3224.c37
3 files changed, 2 insertions, 88 deletions
diff --git a/v4l_experimental/dpl3518.c b/v4l_experimental/dpl3518.c
index 43533767e..76a90be6b 100644
--- a/v4l_experimental/dpl3518.c
+++ b/v4l_experimental/dpl3518.c
@@ -46,12 +46,7 @@
#include <linux/fs.h>
#include <asm/uaccess.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "id.h"
-#include "i2c-compat.h"
-#else
#include <media/id.h>
-#endif
#include "dpl3518.h"
@@ -235,12 +230,7 @@ static void dpl3518_spatial(struct i2c_client *client, int spatial)
/* ----------------------------------------------------------------------- */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static int dpl3518_attach(struct i2c_adapter *adap, int addr, int kind)
-#else
-static int dpl3518_attach(struct i2c_adapter *adap, int addr,
- unsigned short flags, int kind)
-#endif
{
struct dpl3518 *dpl;
struct i2c_client *client;
@@ -365,9 +355,7 @@ static int dpl3518_dev_release(struct inode *inode, struct file *file)
/* ---------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
-#endif
.name = "i2c dpl3518 driver",
.id = I2C_DRIVERID_DPL3518,
.flags = I2C_DF_NOTIFY,
diff --git a/v4l_experimental/v3tv/v3tv.c b/v4l_experimental/v3tv/v3tv.c
index 6f105cb3b..214034573 100644
--- a/v4l_experimental/v3tv/v3tv.c
+++ b/v4l_experimental/v3tv/v3tv.c
@@ -17,14 +17,8 @@
#include <asm/io.h>
#include <asm/pgtable.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <media/tuner.h>
#include <media/audiochip.h>
-#else
-#include "/usr/src/linux/drivers/media/video/i2c-compat.h"
-#include "/usr/src/linux/drivers/media/video/audiochip.h"
-#include "/usr/src/linux/drivers/media/video/tuner.h"
-#endif
//#ifndef I2C_DRIVERID_VPX3224
//#include "vpx-common.h"
@@ -32,9 +26,6 @@
//#include <linux/i2c.h>
-//#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-//#include "../linux/drivers/media/video/i2c-compat.h"
-//#endif
#define UNSET (-1U)
@@ -549,12 +540,8 @@ static inline unsigned long uvirt_to_kva(pgd_t * pgd, unsigned long adr)
#endif
#endif
if (pte_present(pte)) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
ret =
(unsigned long)page_address(pte_page(pte));
-#else
- ret = pte_page(pte);
-#endif
ret |= (adr & (PAGE_SIZE - 1));
}
}
@@ -601,12 +588,8 @@ inline unsigned long kvirt_to_pa(unsigned long adr)
return ret;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-#include <linux/wrapper.h>
-#else
#define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))
#define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))
-#endif
void inline *rvmalloc(signed long size)
{
@@ -753,25 +736,17 @@ int v3tv_get_adapter(struct i2c_adapter *adapter)
if (debug)
printk(KERN_INFO "v3tv: i2c_attach_client releasing adapter: %s\n",
adapter->name);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
module_put(voodoo->voodoo_i2c_adapter->owner);
-#else
- __MOD_DEC_USE_COUNT(voodoo->voodoo_i2c_adapter->owner);
-#endif
voodoo->voodoo_i2c_adapter = NULL;
return 0;
}
voodoo->voodoo_i2c_adapter = adapter;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
if (!try_module_get(adapter->owner)) {
printk("v3tv: Unable to get module %s\n",
adapter->owner->name);
return -ENODEV;
}
-#else
- __MOD_INC_USE_COUNT(voodoo->voodoo_i2c_adapter->owner);
-#endif
printk ("v3tv: i2c dummy driver registered: adapter: 0x%p\n",
voodoo->voodoo_i2c_adapter);
@@ -1402,10 +1377,6 @@ static int do_voodoo_mmap(const char *adr, unsigned long size)
* $Id: v3tv.c,v 1.1 2005/12/25 16:23:58 mkrufky Exp $
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-#define iminor(inode) minor(inode->i_rdev)
-#endif
-
/* External variables: Data struct */
//extern struct voodoo_data *voodoo;
//extern struct video_capture video_standard[];
@@ -2034,11 +2005,7 @@ static int v3tv_radio_open(struct inode *inode, struct file *file)
AUDC_SET_RADIO, &voodoo->tuner_type);
// up(&voodoo->lock);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
try_module_get(THIS_MODULE);
-#else
- MOD_INC_USE_COUNT;
-#endif
printk("v3tv: Radio device opened.\n");
return 0;
}
@@ -2053,11 +2020,7 @@ static int v3tv_radio_release(struct inode *inode, struct file *file)
file->private_data = NULL;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
module_put(THIS_MODULE);
-#else
- MOD_DEC_USE_COUNT;
-#endif
printk("v3tv: Radio device closed.\n");
@@ -2182,11 +2145,7 @@ static irqreturn_t v3tv_video_irq(int irq, void *dev_id, struct pt_regs *regs)
tempReg |= (1 << 31);
v3tv_regwrite(V3REG_intrCtrl, tempReg);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
return capture_ready;
-#else
- return;
-#endif
}
void v3tv_set_palette(struct video_picture *picture_settings)
diff --git a/v4l_experimental/v3tv/vpx3224.c b/v4l_experimental/v3tv/vpx3224.c
index fb5f05b79..8bd535c79 100644
--- a/v4l_experimental/v3tv/vpx3224.c
+++ b/v4l_experimental/v3tv/vpx3224.c
@@ -45,9 +45,6 @@
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#include "i2c-compat.h"
-#endif
#include <linux/videodev.h>
#include <linux/video_decoder.h>
@@ -67,11 +64,9 @@ static int
vpx3224_write_fp_block(struct i2c_client *client,
const u16 * data, int len);
#endif
+
static int vpx3224_detect_client(struct i2c_adapter *adapter, int address,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- unsigned short flags,
-#endif
- int kind);
+ int kind);
/* Each client has this additional data */
@@ -606,12 +601,6 @@ vpx3224_write_fp_block(struct i2c_client *client,
return res;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#if defined (CONFIG_V3TV_VERBOSEDEBUG) & defined (CONFIG_PROC_FS)
-#include "vpx3224-proc.c"
-#endif
-#endif
-
/* ----------------------------------------------------------------------
* Client procedures */
@@ -1097,11 +1086,6 @@ static int vpx3224_detach_client(struct i2c_client *client)
struct vpx3224 *decoder = i2c_get_clientdata(client);
int res;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#if defined (CONFIG_PROC_FS) && defined (CONFIG_V3TV_VERBOSEDEBUG)
- vpx3224_del_proc(client);
-#endif
-#endif
res = i2c_detach_client(client);
DEB2(printk(KERN_INFO "%s: i2c_detach_client returned %d\n",
@@ -1111,11 +1095,7 @@ static int vpx3224_detach_client(struct i2c_client *client)
THIS_MODULE->name, client->name);
return res;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-// MOD_DEC_USE_COUNT;
-#else
module_put(client->adapter->owner);
-#endif
kfree(decoder);
kfree(client);
vpx3224_i2c_id--;
@@ -1144,9 +1124,6 @@ static struct i2c_driver vpx3224_i2c_driver = {
/* vpx3224_detect_client - aka: i2c_client_found_addr_proc *found_proc
* so called by i2c_probe, res passed back to vpx3224_attach_adapter */
static int vpx3224_detect_client(struct i2c_adapter *adapter, int address,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- unsigned short flags,
-#endif
int kind)
{
int res;
@@ -1230,17 +1207,7 @@ static int vpx3224_detect_client(struct i2c_adapter *adapter, int address,
printk(KERN_INFO "%s: %s client found at address 0x%x\n",
THIS_MODULE->name, client->name, client->addr);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#if defined (CONFIG_PROC_FS) && defined (CONFIG_V3TV_VERBOSEDEBUG)
- vpx3224_init_proc(client);
-#endif
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-// MOD_INC_USE_COUNT;
-#else
try_module_get(client->adapter->owner);
-#endif
return vpx3224_i2c_id;
}