summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvmixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/tvmixer.c')
-rw-r--r--linux/drivers/media/video/tvmixer.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c
index ca7330e10..2862efa93 100644
--- a/linux/drivers/media/video/tvmixer.c
+++ b/linux/drivers/media/video/tvmixer.c
@@ -19,16 +19,6 @@
#include <asm/semaphore.h>
#include <asm/uaccess.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-# include "i2c-compat.h"
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
-# define strlcpy(dest,src,len) strncpy(dest,src,(len)-1)
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-# define iminor(inode) minor(inode->i_rdev)
-#endif
-
#define DEV_MAX 4
static int devnr = -1;
@@ -206,14 +196,8 @@ static int tvmixer_open(struct inode *inode, struct file *file)
/* lock bttv in memory while the mixer is in use */
file->private_data = mix;
-#ifndef I2C_PEC
- if (client->adapter->inc_use)
- client->adapter->inc_use(client->adapter);
-#endif
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54)
if (client->adapter->owner)
try_module_get(client->adapter->owner);
-#endif
return 0;
}
@@ -227,21 +211,13 @@ static int tvmixer_release(struct inode *inode, struct file *file)
return -ENODEV;
}
-#ifndef I2C_PEC
- if (client->adapter->dec_use)
- client->adapter->dec_use(client->adapter);
-#endif
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54)
module_put(client->adapter->owner);
-#endif
return 0;
}
static struct i2c_driver driver = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
- .owner = THIS_MODULE,
-#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .owner = THIS_MODULE,
.name = "tvmixer",
.flags = I2C_DF_NOTIFY,
#else
@@ -269,20 +245,10 @@ static const struct file_operations tvmixer_fops = {
static int tvmixer_adapters(struct i2c_adapter *adap)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
struct i2c_client *client;
list_for_each_entry(client, &adap->clients, list)
tvmixer_clients(client);
-#else
- int i;
-
- for (i=0; i<I2C_CLIENT_MAX; i++) {
- if (!adap->clients[i])
- continue;
- tvmixer_clients(adap->clients[i]);
- }
-#endif
return 0;
}
@@ -291,22 +257,8 @@ static int tvmixer_clients(struct i2c_client *client)
struct video_audio va;
int i,minor;
-#ifdef I2C_CLASS_TV_ANALOG
if (!(client->adapter->class & I2C_CLASS_TV_ANALOG))
return -1;
-#else
- /* TV card ??? */
- switch (client->adapter->id) {
- case I2C_HW_SMBUS_VOODOO3:
- case I2C_HW_B_BT848:
- case I2C_HW_B_RIVA:
- /* ok, have a look ... */
- break;
- default:
- /* ignore that one */
- return -1;
- }
-#endif
/* unregister ?? */
for (i = 0; i < DEV_MAX; i++) {