diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-09 22:42:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-09 22:42:07 -0300 |
commit | 06baaa0441c7fec2a211ddf7c502f837cd988132 (patch) | |
tree | 284236ae49b1385a091119cf7b3520bc7d64552a /v4l_experimental/v3tv | |
parent | e5561cf14fe189f7f0d726a1c66ffa992354ab2d (diff) | |
parent | d784aba6717da44bfef18007146f6d00280e39fe (diff) | |
download | mediapointer-dvb-s2-06baaa0441c7fec2a211ddf7c502f837cd988132.tar.gz mediapointer-dvb-s2-06baaa0441c7fec2a211ddf7c502f837cd988132.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/fusionhdtv7
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l_experimental/v3tv')
-rw-r--r-- | v4l_experimental/v3tv/v3tv.c | 53 | ||||
-rw-r--r-- | v4l_experimental/v3tv/vpx3224.c | 44 |
2 files changed, 3 insertions, 94 deletions
diff --git a/v4l_experimental/v3tv/v3tv.c b/v4l_experimental/v3tv/v3tv.c index 6f105cb3b..9029fa733 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) { @@ -731,20 +714,8 @@ int v3tv_get_adapter(struct i2c_adapter *adapter) if (debug) printk(KERN_INFO "v3tv: v3tv_get_adapter trying: %s\n", adapter->name); -// if (I2C_CLASS_TV_ANALOG != adapter->class) -// return 0; -#ifdef I2C_CLASS_TV_ANALOG if (!(adapter->class & I2C_CLASS_TV_ANALOG)) return 0; -#else - switch (adapter->id) { - case I2C_ALGO_BIT | I2C_HW_B_VOO: - if (!strnicmp(adapter->name, "I2C\0", 3)) - break; - default: - return 0; - } -#endif if (debug) printk(KERN_INFO "v3tv: i2c_attach_client found adapter: %s\n", adapter->name); @@ -753,25 +724,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 +1365,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 +1993,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 +2008,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 +2133,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..50c60ca53 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 */ @@ -1078,13 +1067,8 @@ static int vpx3224_attach_adapter(struct i2c_adapter *adapter) { int res = 0; -#ifdef I2C_ADAP_CLASS_TV_ANALOG - if (adapter->class & I2C_ADAP_CLASS_TV_ANALOG) - res = i2c_probe(adapter, &addr_data, vpx3224_detect_client); -#else - if (adapter->id & (I2C_HW_SMBUS_VOODOO3)) + if (adapter->class & I2C_CLASS_TV_ANALOG) res = i2c_probe(adapter, &addr_data, vpx3224_detect_client); -#endif DEB2(printk(KERN_INFO "%s: i2c_probe of adapter: %s returned %d\n", THIS_MODULE->name, adapter->name, res)); @@ -1097,11 +1081,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 +1090,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 +1119,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 +1202,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; } |