diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-09 18:07:06 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-09 18:07:06 +0000 |
commit | 1c769dacd06c44528955753c2cac21b1d4b8ddef (patch) | |
tree | cbd22854f18480a8054382799ade8c765ab618d1 /linux/drivers/media/video/cx88 | |
parent | 15e9f7c5dda7607d5080c899de36fe6003e1318c (diff) | |
download | mediapointer-dvb-s2-1c769dacd06c44528955753c2cac21b1d4b8ddef.tar.gz mediapointer-dvb-s2-1c769dacd06c44528955753c2cac21b1d4b8ddef.tar.bz2 |
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
- Lots of small changes to allow compiling with kernel 2.4.
Compilation result not tested yet.
- After this patch, .version should be removed, since its
syntax has changed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-blackbird.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 13 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-input.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 7 |
7 files changed, 55 insertions, 19 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index bff84dca2..6f41172ef 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-blackbird.c,v 1.36 2005/09/10 12:04:22 catalin Exp $ + * $Id: cx88-blackbird.c,v 1.37 2005/10/09 18:07:06 mchehab Exp $ * * Support for a cx23416 mpeg encoder via cx2388x host port. * "blackbird" reference design. @@ -29,15 +29,16 @@ #include <linux/init.h> #include <linux/fs.h> #include <linux/delay.h> +#include "compat.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #include <linux/device.h> +#endif #include <linux/firmware.h> -#include "compat.h" #include "cx88.h" MODULE_DESCRIPTION("driver for cx2388x/cx23416 based mpeg encoder cards"); -MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>"); -MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); +MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>, Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); MODULE_LICENSE("GPL"); static unsigned int mpegbufs = 32; @@ -619,8 +620,15 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) if (retval < 0) dprintk(0, "Error with register_write\n"); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME, &dev->pci->dev); +#else + retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME, + pci_name(dev->pci)); +#endif + + if (retval != 0) { dprintk(0, "ERROR: Hotplug firmware request failed (%s).\n", BLACKBIRD_FIRM_ENC_FILENAME); diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index 72cbf9d6b..525876cb1 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-core.c,v 1.43 2005/10/09 03:35:25 mchehab Exp $ + * $Id: cx88-core.c,v 1.44 2005/10/09 18:07:06 mchehab Exp $ * * device driver for Conexant 2388x based TV cards * driver core @@ -55,7 +55,11 @@ 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) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +MODULE_PARM(tuner,"1-" __stringify(CX88_MAXBOARDS) "i"); +MODULE_PARM(radiox,"1-" __stringify(CX88_MAXBOARDS) "i"); +MODULE_PARM(card,"1-" __stringify(CX88_MAXBOARDS) "i"); +#elif 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); diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 1705c060d..41cb1012f 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -1,5 +1,5 @@ /* - $Id: cx88-i2c.c,v 1.31 2005/09/13 20:11:39 mkrufky Exp $ + $Id: cx88-i2c.c,v 1.32 2005/10/09 18:07:06 mchehab Exp $ cx88-i2c.c -- all the i2c code is here @@ -32,6 +32,9 @@ #include "compat.h" #include "cx88.h" +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#endif static unsigned int i2c_debug = 0; module_param(i2c_debug, int, 0644); @@ -154,7 +157,9 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = { static struct i2c_adapter cx8800_i2c_adap_template = { .name = "cx2388x", +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .owner = THIS_MODULE, +#endif .id = I2C_HW_B_CX2388x, .client_register = attach_inform, .client_unregister = detach_inform, @@ -197,12 +202,18 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) memcpy(&core->i2c_client, &cx8800_i2c_client_template, sizeof(core->i2c_client)); +#ifdef I2C_CLASS_TV_ANALOG if (core->tuner_type != TUNER_ABSENT) core->i2c_adap.class |= I2C_CLASS_TV_ANALOG; +#endif +#ifdef I2C_CLASS_TV_DIGITAL if (cx88_boards[core->board].dvb) core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,66) core->i2c_adap.dev.parent = &pci->dev; +#endif strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); core->i2c_algo.data = core; i2c_set_adapdata(&core->i2c_adap,core); diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index 37a73ffba..522ba3f45 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-input.c,v 1.20 2005/09/11 05:39:23 mkrufky Exp $ + * $Id: cx88-input.c,v 1.21 2005/10/09 18:07:06 mchehab Exp $ * * Device driver for GPIO attached remote control interfaces * on Conexant 2388x based TV/DVB cards. @@ -30,9 +30,9 @@ #include <linux/module.h> #include <linux/moduleparam.h> -#include <media/ir-common.h> - +#include "compat.h" #include "cx88.h" +#include <media/ir-common.h> /* ---------------------------------------------------------------------- */ @@ -436,6 +436,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir_input_init(&ir->input, &ir->ir, ir_type, ir_codes); ir->input.name = ir->name; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) ir->input.phys = ir->phys; ir->input.id.bustype = BUS_PCI; ir->input.id.version = 1; @@ -447,7 +448,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir->input.id.product = pci->device; } ir->input.dev = &pci->dev; - +#endif /* record handles to ourself */ ir->core = core; core->ir = ir; @@ -578,10 +579,11 @@ void cx88_ir_irq(struct cx88_core *core) /* ---------------------------------------------------------------------- */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) MODULE_AUTHOR("Gerd Knorr, Pavel Machek, Chris Pascoe"); MODULE_DESCRIPTION("input driver for cx88 GPIO-based IR remote controls"); MODULE_LICENSE("GPL"); - +#endif /* * Local variables: * c-basic-offset: 8 diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index d57e1c0d8..e6d1970b3 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -1,5 +1,5 @@ /* - $Id: cx88-tvaudio.c,v 1.45 2005/10/04 14:47:12 nsh Exp $ + $Id: cx88-tvaudio.c,v 1.46 2005/10/09 18:07:06 mchehab Exp $ cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver @@ -53,9 +53,11 @@ #include <linux/init.h> #include <linux/smp_lock.h> #include <linux/delay.h> +#include "compat.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include <linux/kthread.h> +#endif -#include "compat.h" #include "cx88.h" static unsigned int audio_debug = 0; diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 5bbea7789..27fe1af22 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-video.c,v 1.94 2005/09/14 23:42:53 nsh Exp $ + * $Id: cx88-video.c,v 1.95 2005/10/09 18:07:06 mchehab Exp $ * * device driver for Conexant 2388x based TV cards * video4linux video interface @@ -30,10 +30,12 @@ #include <linux/slab.h> #include <linux/interrupt.h> #include <linux/delay.h> +#include "compat.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #include <linux/kthread.h> +#endif #include <asm/div64.h> -#include "compat.h" #include "cx88.h" MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards"); @@ -46,7 +48,11 @@ 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) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +MODULE_PARM(video_nr,"1-" __stringify(CX88_MAXBOARDS) "i"); +MODULE_PARM(vbi_nr,"1-" __stringify(CX88_MAXBOARDS) "i"); +MODULE_PARM(radio_nr,"1-" __stringify(CX88_MAXBOARDS) "i"); +#elif 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); diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 757614cbf..ea16e8300 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -1,5 +1,5 @@ /* - * $Id: cx88.h,v 1.83 2005/10/09 03:35:25 mchehab Exp $ + * $Id: cx88.h,v 1.84 2005/10/09 18:07:06 mchehab Exp $ * * v4l2 device driver for cx2388x based TV cards * @@ -30,7 +30,9 @@ #include <media/tveeprom.h> #include <media/audiochip.h> #include <media/video-buf.h> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) #include <media/video-buf-dvb.h> +#endif #include "compat.h" #include "btcx-risc.h" @@ -436,11 +438,12 @@ struct cx8802_dev { int width; int height; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) /* for dvb only */ struct videobuf_dvb dvb; void* fe_handle; int (*fe_release)(void *handle); - +#endif /* for switching modulation types */ unsigned char ts_gen_cntrl; |