summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c24
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c15
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c34
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c11
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c16
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h6
9 files changed, 2 insertions, 116 deletions
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index c2b1be5d2..0143c8b28 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -14,10 +14,6 @@
#include <linux/init.h>
#include <linux/crc32.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "i2c-compat.h"
-#endif
-
#define MPEG_VIDEO_TARGET_BITRATE_MAX 27000
#define MPEG_VIDEO_MAX_BITRATE_MAX 27000
#define MPEG_TOTAL_TARGET_BITRATE_MAX 27000
@@ -25,9 +21,7 @@
/* Addresses to scan */
static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-#endif
+
I2C_CLIENT_INSMOD;
MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder");
@@ -695,11 +689,7 @@ static int saa6752hs_init(struct i2c_client* client)
return 0;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
-#else
-static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
-#endif
{
struct saa6752hs_state *h;
@@ -718,21 +708,13 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f
i2c_attach_client(&h->client);
v4l_info(&h->client,"saa6752hs: chip found @ 0x%x\n", addr<<1);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- MOD_INC_USE_COUNT;
-#endif
return 0;
}
static int saa6752hs_probe(struct i2c_adapter *adap)
{
-#if I2C_CLASS_TV_ANALOG
if (adap->class & I2C_CLASS_TV_ANALOG)
return i2c_probe(adap, &addr_data, saa6752hs_attach);
-#else
- return i2c_probe(adap, &addr_data, saa6752hs_attach);
-#endif
return 0;
}
@@ -815,10 +797,8 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#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)
.name = "saa6752hs",
.flags = I2C_DF_NOTIFY,
#else
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index 900be78e3..6293eba34 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -16,7 +16,6 @@
*
*/
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/time.h>
@@ -52,14 +51,8 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-static int dummy;
-module_param_array(index, int, dummy, 0444);
-module_param_array(enable, int, dummy, 0444);
-#else
module_param_array(index, int, NULL, 0444);
module_param_array(enable, int, NULL, 0444);
-#endif
MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s).");
MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s).");
@@ -88,10 +81,6 @@ typedef struct snd_card_saa7134 {
} snd_card_saa7134_t;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8)
-#define chip_t snd_card_saa7134_t
-#endif
-
/*
* PCM structure
*/
@@ -1136,7 +1125,3 @@ late_initcall(saa7134_alsa_init);
module_exit(saa7134_alsa_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ricardo Cerqueira");
-
-
-#endif /* LINUX_VERSION_CODE */
-
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 9ed2997f7..511941bca 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -80,28 +80,11 @@ static unsigned int tuner[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
static unsigned int card[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-MODULE_PARM(video_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i");
-MODULE_PARM(vbi_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i");
-MODULE_PARM(radio_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i");
-MODULE_PARM(tuner_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i");
-MODULE_PARM(card,"1-" __stringify(SAA7134_MAXBOARDS) "i");
-#else
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-static int dummy;
-module_param_array(video_nr, int, dummy, 0444);
-module_param_array(vbi_nr, int, dummy, 0444);
-module_param_array(radio_nr, int, dummy, 0444);
-module_param_array(tuner, int, dummy, 0444);
-module_param_array(card, int, dummy, 0444);
-#else
module_param_array(video_nr, int, NULL, 0444);
module_param_array(vbi_nr, int, NULL, 0444);
module_param_array(radio_nr, int, NULL, 0444);
module_param_array(tuner, int, NULL, 0444);
module_param_array(card, int, NULL, 0444);
-#endif
-#endif
MODULE_PARM_DESC(video_nr, "video device number");
MODULE_PARM_DESC(vbi_nr, "vbi device number");
@@ -209,20 +192,6 @@ static void dump_statusregs(struct saa7134_dev *dev)
#if defined(CONFIG_MODULES) && defined(MODULE)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-
-static void request_submodules(struct saa7134_dev *dev){
- if (card_is_empress(dev))
- request_module("saa7134-empress");
- if (card_is_dvb(dev))
- request_module("saa7134-dvb");
- if (alsa)
- request_module("saa7134-alsa");
- if (oss)
- request_module("saa7134-oss");
-}
-#else
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void request_module_async(void *ptr){
struct saa7134_dev* dev=(struct saa7134_dev*)ptr;
@@ -249,7 +218,6 @@ static void request_submodules(struct saa7134_dev *dev)
#endif
schedule_work(&dev->request_module_wk);
}
-#endif
#else
#define request_submodules(dev)
@@ -893,10 +861,8 @@ static struct video_device *vdev_init(struct saa7134_dev *dev,
return NULL;
*vfd = *template;
vfd->minor = -1;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
vfd->dev = &dev->pci->dev;
vfd->release = video_device_release;
-#endif
vfd->debug = video_debug;
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
dev->name, type, saa7134_boards[dev->board].name);
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index 837470f4d..d4afbce9d 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -37,16 +37,7 @@ MODULE_LICENSE("GPL");
static unsigned int empress_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-MODULE_PARM(empress_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i");
-#else
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-static int dummy;
-module_param_array(empress_nr, int, dummy, 0444);
-#else
module_param_array(empress_nr, int, NULL, 0444);
-#endif
-#endif
MODULE_PARM_DESC(empress_nr,"ts device number");
static unsigned int debug;
@@ -482,10 +473,8 @@ static int empress_init(struct saa7134_dev *dev)
if (NULL == dev->empress_dev)
return -ENOMEM;
*(dev->empress_dev) = saa7134_empress_template;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
dev->empress_dev->dev = &dev->pci->dev;
dev->empress_dev->release = video_device_release;
-#endif
snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name),
"%s empress (%s)", dev->name,
saa7134_boards[dev->board].name);
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index 64858dfe8..610e506b5 100644
--- a/linux/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -368,12 +368,8 @@ static struct i2c_algorithm saa7134_algo = {
};
static struct i2c_adapter saa7134_adap_template = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
.owner = THIS_MODULE,
-#endif
-#ifdef I2C_CLASS_TV_ANALOG
.class = I2C_CLASS_TV_ANALOG,
-#endif
.name = "saa7134",
.id = I2C_HW_SAA7134,
.algo = &saa7134_algo,
@@ -447,9 +443,7 @@ void saa7134_i2c_call_clients(struct saa7134_dev *dev,
int saa7134_i2c_register(struct saa7134_dev *dev)
{
dev->i2c_adap = saa7134_adap_template;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,66)
dev->i2c_adap.dev.parent = &dev->pci->dev;
-#endif
strcpy(dev->i2c_adap.name,dev->name);
dev->i2c_adap.algo_data = dev;
i2c_add_adapter(&dev->i2c_adap);
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index aecaa7cd0..c12184a38 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -463,7 +463,6 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir_input_init(input_dev, &ir->ir, ir_type, ir_codes);
input_dev->name = ir->name;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
input_dev->phys = ir->phys;
input_dev->id.bustype = BUS_PCI;
input_dev->id.version = 1;
@@ -483,7 +482,6 @@ int saa7134_input_init1(struct saa7134_dev *dev)
input_dev->dev = &dev->pci->dev;
#endif
#endif
-#endif
dev->remote = ir;
saa7134_ir_start(dev, ir);
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index a4fe3c41b..f7a3f1d0a 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -496,14 +496,6 @@ static int tvaudio_thread(void *data)
unsigned int i, audio, nscan;
int max1,max2,carrier,rx,mode,lastmode,default_carrier;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
- lock_kernel();
- daemonize();
- sigfillset(&current->blocked);
- sprintf(current->comm, "%s", dev->name);
- unlock_kernel();
-#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
set_freezable();
#endif
@@ -821,14 +813,6 @@ static int tvaudio_thread_ddep(void *data)
struct saa7134_dev *dev = data;
u32 value, norms;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
- lock_kernel();
- daemonize();
- sigfillset(&current->blocked);
- sprintf(current->comm, "%s", dev->name);
- unlock_kernel();
-#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
set_freezable();
#endif
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 33ad87e6b..e02bd2659 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -2356,9 +2356,7 @@ static const struct file_operations video_fops =
.poll = video_poll,
.mmap = video_mmap,
.ioctl = video_ioctl2,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
.compat_ioctl = v4l_compat_ioctl32,
-#endif
.llseek = no_llseek,
};
@@ -2368,9 +2366,7 @@ static const struct file_operations radio_fops =
.open = video_open,
.release = video_release,
.ioctl = video_ioctl2,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
.compat_ioctl = v4l_compat_ioctl32,
-#endif
.llseek = no_llseek,
};
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 987c4338f..08bc1d0fa 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -41,12 +41,8 @@
#include <media/ir-common.h>
#include <media/ir-kbd-i2c.h>
#include <media/videobuf-dma-sg.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,64)
-#include "i2c-compat.h"
-#else
#include <sound/core.h>
#include <sound/pcm.h>
-#endif
#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE)
#include <media/videobuf-dvb.h>
#endif
@@ -450,13 +446,11 @@ struct saa7134_dmasound {
unsigned int read_offset;
unsigned int read_count;
void * priv_data;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
snd_pcm_substream_t *substream;
#else
struct snd_pcm_substream *substream;
#endif
-#endif
};
/* ts/mpeg status */