diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-08 01:17:00 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-08 01:17:00 +0200 |
commit | 1e35850ac2509c324478d38091880e60ab28795f (patch) | |
tree | ffb89f595c6bcea9189a5f090fad092c8aa7428e /linux/drivers | |
parent | 7ce87336c2f386ab6c35e985a5832d21b5cd7fab (diff) | |
download | mediapointer-dvb-s2-1e35850ac2509c324478d38091880e60ab28795f.tar.gz mediapointer-dvb-s2-1e35850ac2509c324478d38091880e60ab28795f.tar.bz2 |
v4l-dvb: remove support for kernels < 2.6.10
From: Hans Verkuil <hverkuil@xs4all.nl>
Phase 2 removes support for kernels < 2.6.10.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers')
41 files changed, 3 insertions, 298 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c index 23428cd30..326f76089 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c @@ -20,11 +20,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d) } strncpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name)); -#ifdef I2C_ADAP_CLASS_TV_DIGITAL - d->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL, -#else d->i2c_adap.class = I2C_CLASS_TV_DIGITAL, -#endif d->i2c_adap.algo = d->props.i2c_algo; d->i2c_adap.algo_data = NULL; d->i2c_adap.dev.parent = &d->udev->dev; diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 04e1bcd6a..0909eb861 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -2471,11 +2471,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, get recognized before the main driver is fully loaded */ saa7146_write(dev, GPIO_CTRL, 0x500000); -#ifdef I2C_ADAP_CLASS_TV_DIGITAL - av7110->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL; -#else av7110->i2c_adap.class = I2C_CLASS_TV_DIGITAL; -#endif strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name)); saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */ diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c index 18cac4b12..6f4ddb643 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -497,11 +497,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, if (bi->type != BUDGET_FS_ACTIVY) saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */ -#ifdef I2C_ADAP_CLASS_TV_DIGITAL - budget->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL; -#else budget->i2c_adap.class = I2C_CLASS_TV_DIGITAL; -#endif strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name)); diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index df7add8a9..fa84a6b49 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -1698,11 +1698,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i i2c_set_adapdata(&ttusb->i2c_adap, ttusb); -#ifdef I2C_ADAP_CLASS_TV_DIGITAL - ttusb->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL; -#else ttusb->i2c_adap.class = I2C_CLASS_TV_DIGITAL; -#endif ttusb->i2c_adap.algo = &ttusb_dec_algo; ttusb->i2c_adap.algo_data = NULL; ttusb->i2c_adap.dev.parent = &udev->dev; diff --git a/linux/drivers/media/video/bt8xx/bt832.c b/linux/drivers/media/video/bt8xx/bt832.c index fc884c935..53d219c7d 100644 --- a/linux/drivers/media/video/bt8xx/bt832.c +++ b/linux/drivers/media/video/bt8xx/bt832.c @@ -205,13 +205,8 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind) static int bt832_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, bt832_attach); -#else - if (adap->id == I2C_HW_B_BT848) - return i2c_probe(adap, &addr_data, bt832_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c index 10a519642..4d283be22 100644 --- a/linux/drivers/media/video/bt8xx/bttv-cards.c +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c @@ -115,22 +115,12 @@ module_param(gpiomask, int, 0444); module_param(audioall, int, 0444); module_param(autoload, int, 0444); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(card, int, dummy, 0444); -module_param_array(pll, int, dummy, 0444); -module_param_array(tuner, int, dummy, 0444); -module_param_array(svhs, int, dummy, 0444); -module_param_array(remote, int, dummy, 0444); -module_param_array(audiomux, int, dummy, 0444); -#else module_param_array(card, int, NULL, 0444); module_param_array(pll, int, NULL, 0444); module_param_array(tuner, int, NULL, 0444); module_param_array(svhs, int, NULL, 0444); module_param_array(remote, int, NULL, 0444); module_param_array(audiomux, int, NULL, 0444); -#endif MODULE_PARM_DESC(triton1,"set ETBF pci config bit " "[enable bug compatibility for triton1 + others]"); diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 33db080bb..d63ca727f 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -130,12 +130,7 @@ module_param(uv_ratio, int, 0444); module_param(full_luma_range, int, 0444); module_param(coring, int, 0444); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(radio, int, dummy, 0444); -#else module_param_array(radio, int, NULL, 0444); -#endif MODULE_PARM_DESC(radio,"The TV card supports radio, default is 0 (no)"); MODULE_PARM_DESC(bigendian,"byte order of the framebuffer, default is native endian"); @@ -4376,11 +4371,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, btv->c.nr); return -EIO; } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,7) - if (pci_set_dma_mask(dev, 0xffffffff)) { -#else if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { -#endif printk(KERN_WARNING "bttv%d: No suitable DMA available.\n", btv->c.nr); return -EIO; @@ -4587,11 +4578,7 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state) btv->state.gpio_data = gpio_read(); /* save pci state */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_save_state(pci_dev, btv->state.pci_cfg); -#else pci_save_state(pci_dev); -#endif if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) { pci_disable_device(pci_dev); btv->state.disabled = 1; @@ -4626,11 +4613,7 @@ static int bttv_resume(struct pci_dev *pci_dev) return err; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_restore_state(pci_dev, btv->state.pci_cfg); -#else pci_restore_state(pci_dev); -#endif /* restore bt878 state */ bttv_reinit_bt848(btv); diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index e0c52aa27..4f48dfb26 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -421,9 +421,7 @@ int __devinit init_bttv_i2c(struct bttv *btv) btv->c.i2c_adap.algo_data = &btv->i2c_algo; } btv->c.i2c_adap.owner = THIS_MODULE; -#ifdef I2C_CLASS_TV_ANALOG btv->c.i2c_adap.class = I2C_CLASS_TV_ANALOG; -#endif btv->c.i2c_adap.client_register = attach_inform; btv->c.i2c_adap.dev.parent = &btv->c.pci->dev; @@ -434,12 +432,10 @@ int __devinit init_bttv_i2c(struct bttv *btv) i2c_set_adapdata(&btv->c.i2c_adap, btv); btv->i2c_client.adapter = &btv->c.i2c_adap; -#ifdef I2C_CLASS_TV_ANALOG if (bttv_tvcards[btv->c.type].no_video) btv->c.i2c_adap.class &= ~I2C_CLASS_TV_ANALOG; if (bttv_tvcards[btv->c.type].has_dvb) btv->c.i2c_adap.class |= I2C_CLASS_TV_DIGITAL; -#endif if (btv->use_i2c_hw) { btv->i2c_rc = i2c_add_adapter(&btv->c.i2c_adap); diff --git a/linux/drivers/media/video/bt8xx/bttvp.h b/linux/drivers/media/video/bt8xx/bttvp.h index 96679f533..c3d1703ac 100644 --- a/linux/drivers/media/video/bt8xx/bttvp.h +++ b/linux/drivers/media/video/bt8xx/bttvp.h @@ -308,9 +308,6 @@ struct bttv_input { }; struct bttv_suspend_state { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - u32 pci_cfg[64 / sizeof(u32)]; -#endif u32 gpio_enable; u32 gpio_data; int disabled; diff --git a/linux/drivers/media/video/cx18/cx18-i2c.c b/linux/drivers/media/video/cx18/cx18-i2c.c index f6b7289db..64a259405 100644 --- a/linux/drivers/media/video/cx18/cx18-i2c.c +++ b/linux/drivers/media/video/cx18/cx18-i2c.c @@ -39,10 +39,6 @@ #define GETSCL_BIT 0x0004 #define GETSDL_BIT 0x0008 -#ifndef I2C_ADAP_CLASS_TV_ANALOG -#define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG -#endif - #define CX18_CS5345_I2C_ADDR 0x4c /* This array should match the CX18_HW_ defines */ @@ -234,9 +230,7 @@ static struct i2c_adapter cx18_i2c_adap_template = { .client_unregister = detach_inform, .owner = THIS_MODULE, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#endif + .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index 1e1588bee..a34f83052 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -50,16 +50,9 @@ static unsigned int video_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) -static unsigned 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); -#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); -#endif MODULE_PARM_DESC(video_nr, "video device numbers"); MODULE_PARM_DESC(vbi_nr, "vbi device numbers"); diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index a8e985b6f..c675cbeae 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -98,10 +98,6 @@ struct cx88_audio_dev { typedef struct cx88_audio_dev snd_cx88_card_t; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8) -#define chip_t snd_cx88_card_t -#endif - #ifdef COMPAT_SND_CTL_BOOLEAN_MONO static int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) @@ -122,19 +118,10 @@ 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 unsigned int dummy; -module_param_array(enable, bool, dummy, 0444); -#else module_param_array(enable, bool, NULL, 0444); -#endif MODULE_PARM_DESC(enable, "Enable cx88x soundcard. default enabled."); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -module_param_array(index, int, dummy, 0444); -#else module_param_array(index, int, NULL, 0444); -#endif MODULE_PARM_DESC(index, "Index value for cx88x capture interface(s)."); diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index e8932ddf1..9329dbf6a 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -33,16 +33,9 @@ static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(tuner, int, dummy, 0444); -module_param_array(radio, int, dummy, 0444); -module_param_array(card, int, dummy, 0444); -#else module_param_array(tuner, int, NULL, 0444); module_param_array(radio, int, NULL, 0444); module_param_array(card, int, NULL, 0444); -#endif MODULE_PARM_DESC(tuner,"tuner type"); MODULE_PARM_DESC(radio,"radio tuner type"); diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 0f8ca620b..df615f19a 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -184,14 +184,10 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) memcpy(&core->i2c_algo, &cx8800_i2c_algo_template, sizeof(core->i2c_algo)); -#ifdef I2C_CLASS_TV_ANALOG if (core->board.tuner_type != TUNER_ABSENT) core->i2c_adap.class |= I2C_CLASS_TV_ANALOG; -#endif -#ifdef I2C_CLASS_TV_DIGITAL if (core->board.mpeg & CX88_MPEG_DVB) core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL; -#endif core->i2c_adap.dev.parent = &pci->dev; strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index b95f6804f..4af6604ec 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -566,11 +566,7 @@ static int cx8802_suspend_common(struct pci_dev *pci_dev, pm_message_t state) cx88_shutdown(dev->core); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_save_state(pci_dev, dev->state.pci_cfg); -#else pci_save_state(pci_dev); -#endif if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) { pci_disable_device(pci_dev); dev->state.disabled = 1; @@ -602,11 +598,7 @@ static int cx8802_resume_common(struct pci_dev *pci_dev) return err; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_restore_state(pci_dev, dev->state.pci_cfg); -#else pci_restore_state(pci_dev); -#endif #if 1 /* FIXME: re-initialize hardware */ diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 786800e1a..fe58a1f14 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -56,16 +56,9 @@ static unsigned int video_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static unsigned 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); -#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); -#endif MODULE_PARM_DESC(video_nr,"video device numbers"); MODULE_PARM_DESC(vbi_nr,"vbi device numbers"); @@ -2290,11 +2283,7 @@ static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state) cx88_shutdown(core); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_save_state(pci_dev, dev->state.pci_cfg); -#else pci_save_state(pci_dev); -#endif if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) { pci_disable_device(pci_dev); dev->state.disabled = 1; @@ -2326,11 +2315,7 @@ static int cx8800_resume(struct pci_dev *pci_dev) return err; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_restore_state(pci_dev, dev->state.pci_cfg); -#else pci_restore_state(pci_dev); -#endif #if 1 /* FIXME: re-initialize hardware */ diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index 4dbe81282..20800425c 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -120,9 +120,7 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template, sizeof(vp3054_i2c->algo)); -#ifdef I2C_CLASS_TV_DIGITAL vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL; -#endif vp3054_i2c->adap.dev.parent = &dev->pci->dev; strlcpy(vp3054_i2c->adap.name, core->name, diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 4222f919e..161b3cc13 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -386,9 +386,6 @@ struct cx8800_fh { }; struct cx8800_suspend_state { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - u32 pci_cfg[64 / sizeof(u32)]; -#endif int disabled; }; @@ -445,9 +442,6 @@ struct cx8802_fh { }; struct cx8802_suspend_state { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - u32 pci_cfg[64 / sizeof(u32)]; -#endif int disabled; }; diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c index c22e73019..8344e87ce 100644 --- a/linux/drivers/media/video/em28xx/em28xx-i2c.c +++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c @@ -527,9 +527,7 @@ static struct i2c_adapter em28xx_adap_template = { .inc_use = inc_use, .dec_use = dec_use, #endif -#ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, -#endif .name = "em28xx", .id = I2C_HW_B_EM28XX, .algo = &em28xx_algo, diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index b3eb14501..098acbd32 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -80,18 +80,10 @@ static unsigned int video_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) -static int dummy; -module_param_array(card, int, dummy, 0444); -module_param_array(video_nr, int, dummy, 0444); -module_param_array(vbi_nr, int, dummy, 0444); -module_param_array(radio_nr, int, dummy, 0444); -#else module_param_array(card, int, NULL, 0444); module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); -#endif MODULE_PARM_DESC(card, "card type"); MODULE_PARM_DESC(video_nr, "video device numbers"); MODULE_PARM_DESC(vbi_nr, "vbi device numbers"); diff --git a/linux/drivers/media/video/ivtv/ivtv-i2c.c b/linux/drivers/media/video/ivtv/ivtv-i2c.c index b9e38c849..3446ab458 100644 --- a/linux/drivers/media/video/ivtv/ivtv-i2c.c +++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c @@ -75,10 +75,6 @@ #define IVTV_REG_I2C_GETSCL_OFFSET 0x7008 #define IVTV_REG_I2C_GETSDA_OFFSET 0x700c -#ifndef I2C_ADAP_CLASS_TV_ANALOG -#define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG -#endif /* I2C_ADAP_CLASS_TV_ANALOG */ - #define IVTV_CS53L32A_I2C_ADDR 0x11 #define IVTV_M52790_I2C_ADDR 0x48 #define IVTV_CX25840_I2C_ADDR 0x44 @@ -564,9 +560,7 @@ static struct i2c_adapter ivtv_i2c_adap_hw_template = { .client_unregister = detach_inform, .owner = THIS_MODULE, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#endif + .class = I2C_CLASS_TV_ANALOG, #endif }; @@ -622,9 +616,7 @@ static struct i2c_adapter ivtv_i2c_adap_template = { .client_unregister = detach_inform, .owner = THIS_MODULE, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#endif + .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index 8236b2b2d..0ac103a8c 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -830,13 +830,9 @@ int pwc_isoc_init(struct pwc_device *pdev) /* Get the current alternate interface, adjust packet size */ if (!udev->actconfig) return -EFAULT; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) - idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate]; -#else intf = usb_ifnum_to_if(udev, 0); if (intf) idesc = usb_altnum_to_altsetting(intf, pdev->valternate); -#endif if (!idesc) return -EFAULT; @@ -1472,15 +1468,9 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) pos += (unsigned long)pdev->image_data; while (size > 0) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - page = kvirt_to_pa(pos); - if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) - return -EAGAIN; -#else page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) return -EAGAIN; -#endif start += PAGE_SIZE; pos += PAGE_SIZE; if (size > PAGE_SIZE) @@ -1943,13 +1933,8 @@ module_param_named(trace, pwc_trace, int, 0644); #endif module_param(power_save, int, 0444); module_param(compression, int, 0444); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -module_param_array(leds, int, leds_nargs, 0444); -module_param_array(dev_hint, charp, dev_hint_nargs, 0444); -#else module_param_array(leds, int, &leds_nargs, 0444); module_param_array(dev_hint, charp, &dev_hint_nargs, 0444); -#endif MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index 514c2d600..6b5e3b5b2 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -445,18 +445,8 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind) static int saa6588_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, saa6588_attach); -#else - switch (adap->id) { - case I2C_HW_B_BT848: - case I2C_HW_B_RIVA: - case I2C_HW_SAA7134: - return i2c_probe(adap, &addr_data, saa6588_attach); - break; - } -#endif return 0; } diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index be03921f7..0275def5b 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -1588,9 +1588,7 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = saa7115_command, .probe = saa7115_probe, .remove = saa7115_remove, -#ifdef I2C_CLASS_TV_ANALOG .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = saa7115_id, #endif diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 21b36c993..9e0e9f7b2 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -715,12 +715,8 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind) 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; } 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 88a10fbd5..511941bca 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -80,20 +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,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 MODULE_PARM_DESC(video_nr, "video device number"); MODULE_PARM_DESC(vbi_nr, "vbi device number"); diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index cb74ac0c5..d4afbce9d 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -37,12 +37,7 @@ MODULE_LICENSE("GPL"); static unsigned int empress_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; -#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 MODULE_PARM_DESC(empress_nr,"ts device number"); static unsigned int debug; diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index 9f94def45..610e506b5 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -369,9 +369,7 @@ static struct i2c_algorithm saa7134_algo = { static struct i2c_adapter saa7134_adap_template = { .owner = THIS_MODULE, -#ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, -#endif .name = "saa7134", .id = I2C_HW_SAA7134, .algo = &saa7134_algo, diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c index 38d4707c5..6f9f90cc6 100644 --- a/linux/drivers/media/video/saa717x.c +++ b/linux/drivers/media/video/saa717x.c @@ -1531,9 +1531,7 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = saa717x_command, .probe = saa717x_probe, .remove = saa717x_remove, -#ifdef I2C_CLASS_TV_ANALOG .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = saa717x_id, #endif diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index f873e3256..265a09690 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -334,13 +334,8 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind) static int tda7432_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, tda7432_attach); -#else - if (adap->id == I2C_HW_B_BT848) - return i2c_probe(adap, &addr_data, tda7432_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index b32a34c4b..e1c7550d5 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -269,13 +269,8 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr, int kind) static int tda9875_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, tda9875_attach); -#else - if (adap->id == I2C_HW_B_BT848) - return i2c_probe(adap, &addr_data, tda9875_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 16d2df0d5..32554f1cf 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -166,14 +166,8 @@ module_param_named(debug,tuner_debug, int, 0644); module_param_string(pal, pal, sizeof(pal), 0644); module_param_string(secam, secam, sizeof(secam), 0644); module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static unsigned int dummy; -module_param_array(tv_range, int, dummy, 0644); -module_param_array(radio_range, int, dummy, 0644); -#else module_param_array(tv_range, int, NULL, 0644); module_param_array(radio_range, int, NULL, 0644); -#endif MODULE_DESCRIPTION("device driver for various TV and TV+FM radio tuners"); MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); @@ -1265,11 +1259,7 @@ static int tuner_legacy_probe(struct i2c_adapter *adap) normal_i2c[1] = I2C_CLIENT_END; } -#ifdef I2C_CLASS_TV_ANALOG if ((adap->class & I2C_CLASS_TV_ANALOG) == 0) -#else - if (adap->id != I2C_HW_B_BT848) -#endif return 0; /* HACK: Ignore 0x6b and 0x6f on cx88 boards. diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 961736a11..b40ebd0a3 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -1843,17 +1843,8 @@ static int chip_legacy_probe(struct i2c_adapter *adap) because dedicated drivers are used */ if ((adap->id == I2C_HW_SAA7146)) return 0; -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return 1; -#else - switch (adap->id) { - case I2C_HW_B_BT848: - case I2C_HW_B_RIVA: - case I2C_HW_SAA7134: - return 1; - } -#endif return 0; } diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index 43ec790d6..4260b833a 100644 --- a/linux/drivers/media/video/tvmixer.c +++ b/linux/drivers/media/video/tvmixer.c @@ -265,22 +265,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++) { diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index c5bc897e9..bf464540c 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/drivers/media/video/usbvision/usbvision-core.c @@ -2570,7 +2570,6 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision) return; /* Unschedule all of the iso td's */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { usb_kill_urb(usbvision->sbuf[bufIdx].urb); if (usbvision->sbuf[bufIdx].data){ @@ -2582,25 +2581,6 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision) usb_free_urb(usbvision->sbuf[bufIdx].urb); usbvision->sbuf[bufIdx].urb = NULL; } -#else - for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { - errCode = usb_unlink_urb(usbvision->sbuf[bufIdx].urb); - if (errCode < 0) - err("%s: usb_unlink_urb() failed: error %d", - __func__, errCode); - } - - if (usbvision->sbuf[bufIdx].data){ - usb_buffer_free(usbvision->dev, - sb_size, - usbvision->sbuf[bufIdx].data, - usbvision->sbuf[bufIdx].urb->transfer_dma); - } - /* Delete them all */ - for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) - usb_free_urb(usbvision->sbuf[bufIdx].urb); -#endif - PDEBUG(DBG_ISOC, "%s: streaming=Stream_Off\n", __func__); usbvision->streaming = Stream_Off; diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c index d6d12debc..e09d0bea5 100644 --- a/linux/drivers/media/video/usbvision/usbvision-i2c.c +++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c @@ -540,13 +540,7 @@ static struct i2c_adapter i2c_adap_template = { .id = I2C_HW_B_BT848, /* FIXME */ .client_register = attach_inform, .client_unregister = detach_inform, -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#else -#ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, -#endif -#endif }; static struct i2c_client i2c_client_template = { diff --git a/linux/drivers/media/video/videobuf-dma-sg.c b/linux/drivers/media/video/videobuf-dma-sg.c index 22c3c93b2..39ae44bda 100644 --- a/linux/drivers/media/video/videobuf-dma-sg.c +++ b/linux/drivers/media/video/videobuf-dma-sg.c @@ -265,11 +265,7 @@ int videobuf_dma_sync(struct videobuf_queue *q, struct videobuf_dmabuf *dma) MAGIC_CHECK(dma->magic, MAGIC_DMABUF); BUG_ON(!dma->sglen); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) - dma_sync_sg(q->dev, dma->sglist, dma->nr_pages, dma->direction); -#else dma_sync_sg_for_cpu(q->dev, dma->sglist, dma->nr_pages, dma->direction); -#endif return 0; } @@ -392,13 +388,8 @@ videobuf_vm_close(struct vm_area_struct *vma) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) static struct page* -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,1) -videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, - int write_access) -#else videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, int *type) -#endif { struct page *page; @@ -410,10 +401,8 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, if (!page) return NOPAGE_OOM; clear_user_page(page_address(page), vaddr, page); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1) if (type) *type = VM_FAULT_MINOR; -#endif return page; } #else diff --git a/linux/drivers/media/video/videobuf-dvb.c b/linux/drivers/media/video/videobuf-dvb.c index 9a821371a..918c4574e 100644 --- a/linux/drivers/media/video/videobuf-dvb.c +++ b/linux/drivers/media/video/videobuf-dvb.c @@ -13,8 +13,6 @@ * (at your option) any later version. */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) - #include <linux/module.h> #include <linux/init.h> #include <linux/device.h> @@ -286,5 +284,3 @@ EXPORT_SYMBOL(videobuf_dvb_unregister); * compile-command: "make DVB=1" * End: */ -#endif /* LINUX_VERSION_CODE */ - diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index c368dfe84..e2d6d7a2c 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -179,9 +179,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = vp27smpx_command, .probe = vp27smpx_probe, .remove = vp27smpx_remove, -#ifndef I2C_CLASS_TV_ANALOG - .legacy_id = I2C_HW_B_CX2341X, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = vp27smpx_id, #endif diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c index 1eb8ef8a5..e2df9f80e 100644 --- a/linux/drivers/media/video/wm8739.c +++ b/linux/drivers/media/video/wm8739.c @@ -337,9 +337,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = wm8739_command, .probe = wm8739_probe, .remove = wm8739_remove, -#ifndef I2C_CLASS_TV_ANALOG - .legacy_id = I2C_HW_B_CX2341X, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = wm8739_id, #endif |