diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-08 00:19:19 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-08 00:19:19 +0200 |
commit | 7ce87336c2f386ab6c35e985a5832d21b5cd7fab (patch) | |
tree | 13562d693161dbaef976462e0f777fd49f4f8bf1 /linux/drivers/media/video/tvmixer.c | |
parent | 64a2df85368a26eafb15272ae2ba0fc556fbae21 (diff) | |
download | mediapointer-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/drivers/media/video/tvmixer.c')
-rw-r--r-- | linux/drivers/media/video/tvmixer.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index ca7330e10..43ec790d6 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; @@ -210,10 +200,8 @@ static int tvmixer_open(struct inode *inode, struct file *file) 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; } @@ -231,17 +219,13 @@ static int tvmixer_release(struct inode *inode, struct file *file) 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 +253,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; } |