diff options
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa6752hs.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 9 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 23 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-empress.c | 11 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-i2c.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 27 |
6 files changed, 54 insertions, 32 deletions
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 888e0b19d..fa3df17a4 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -15,11 +15,9 @@ #include <linux/crc32.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#include "id.h" -#else -#include <media/id.h> +#include <media/i2c-compat.h> #endif +#include <media/id.h> #define MPEG_VIDEO_TARGET_BITRATE_MAX 27000 #define MPEG_VIDEO_MAX_BITRATE_MAX 27000 @@ -543,8 +541,12 @@ 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; } @@ -610,7 +612,9 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) .owner = THIS_MODULE, +#endif .name = "i2c saa6752hs MPEG encoder", .id = I2C_DRIVERID_SAA6752HS, .flags = I2C_DF_NOTIFY, diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 782d11a7e..bb7eccc72 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -2,7 +2,7 @@ * SAA713x ALSA support for V4L * Ricardo Cerqueira <v4l@cerqueira.org> * - * $Id: saa7134-alsa.c,v 1.5 2005/10/08 09:20:24 nsh Exp $ + * $Id: saa7134-alsa.c,v 1.6 2005/10/09 18:07:06 mchehab Exp $ * * Caveats: * - Volume doesn't work (it's always at max) @@ -22,20 +22,21 @@ * */ -#include <sound/driver.h> +#include "compat.h" +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) #include <linux/init.h> #include <linux/slab.h> #include <linux/time.h> #include <linux/wait.h> #include <linux/moduleparam.h> #include <linux/module.h> +#include <sound/driver.h> #include <sound/core.h> #include <sound/control.h> #include <sound/pcm.h> #include <sound/rawmidi.h> #include <sound/initval.h> -#include "compat.h" #include "saa7134.h" #include "saa7134-reg.h" @@ -988,3 +989,5 @@ void alsa_card_saa7134_exit(void) snd_card_free(snd_saa7134_cards[idx]); } } +#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 ee4d489ad..80350ccc8 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-core.c,v 1.44 2005/10/08 09:20:24 nsh Exp $ + * $Id: saa7134-core.c,v 1.45 2005/10/09 18:07:06 mchehab Exp $ * * device driver for philips saa7134 based TV cards * driver core @@ -75,7 +75,16 @@ static unsigned int mixer_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; 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) + +#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(dsp_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); +MODULE_PARM(mixer_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); +MODULE_PARM(tuner_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); +MODULE_PARM(card,"1-" __stringify(SAA7134_MAXBOARDS) "i"); +#elif 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); @@ -244,9 +253,13 @@ static void dump_statusregs(struct saa7134_dev *dev) /* delayed request_module */ #ifdef CONFIG_MODULES - static int need_empress; static int need_dvb; +static int pending_registered=0; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#define request_module_depend(name,flag) request_module(name); +#else static int pending_call(struct notifier_block *self, unsigned long state, void *module) @@ -261,7 +274,6 @@ static int pending_call(struct notifier_block *self, unsigned long state, return NOTIFY_DONE; } -static int pending_registered; static struct notifier_block pending_notifier = { .notifier_call = pending_call, }; @@ -284,6 +296,7 @@ static void request_module_depend(char *name, int *flag) break; } } +#endif #else @@ -1258,9 +1271,11 @@ static int saa7134_init(void) static void saa7134_fini(void) { #ifdef CONFIG_MODULES +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) if (pending_registered) unregister_module_notifier(&pending_notifier); #endif +#endif pci_unregister_driver(&saa7134_pci_driver); } diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index 6c61550cb..aa5936b5a 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-empress.c,v 1.12 2005/07/15 21:44:14 mchehab Exp $ + * $Id: saa7134-empress.c,v 1.13 2005/10/09 18:07:06 mchehab Exp $ * * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] * @@ -30,11 +30,7 @@ #include "saa7134-reg.h" #include "saa7134.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,64) -#include "saa6752hs.h" -#else #include <media/saa6752hs.h> -#endif /* ------------------------------------------------------------------ */ @@ -42,7 +38,10 @@ MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); MODULE_LICENSE("GPL"); static unsigned int empress_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +MODULE_PARM(empress_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static int dummy; module_param_array(empress_nr, int, dummy, 0444); #else diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index a199d7a76..dd4c3b60e 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-i2c.c,v 1.24 2005/09/19 01:20:14 mkrufky Exp $ + * $Id: saa7134-i2c.c,v 1.25 2005/10/09 18:07:06 mchehab Exp $ * * device driver for philips saa7134 based TV cards * i2c interface support @@ -382,7 +382,9 @@ 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 diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 9d54dbd45..e50d2ab64 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.61 2005/10/08 09:20:24 nsh Exp $ + * $Id: saa7134.h,v 1.62 2005/10/09 18:07:06 mchehab Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -31,22 +31,21 @@ #include <asm/io.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,64) -#include "video-buf.h" -#include "tuner.h" -#include "audiochip.h" -#include "id.h" -#include "i2c-compat.h" -#include "ir-common.h" -#else +#include "compat.h" #include <media/tuner.h> #include <media/audiochip.h> #include <media/id.h> #include <media/ir-common.h> #include <media/video-buf.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,64) +#include <media/i2c-compat.h> +#else #include <media/video-buf-dvb.h> +#include <sound/driver.h> +#include <sound/core.h> +#include <sound/pcm.h> #endif -#include "compat.h" + #ifndef TRUE # define TRUE (1==1) @@ -56,10 +55,6 @@ #endif #define UNSET (-1U) -#include <sound/driver.h> -#include <sound/core.h> -#include <sound/pcm.h> - /* ----------------------------------------------------------- */ /* enums */ @@ -379,7 +374,9 @@ struct saa7134_oss { unsigned int dma_blk; unsigned int read_offset; unsigned int read_count; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) snd_pcm_substream_t *substream; +#endif }; /* IR input */ @@ -511,8 +508,10 @@ struct saa7134_dev { struct work_struct empress_workqueue; int empress_started; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* SAA7134_MPEG_DVB only */ struct videobuf_dvb dvb; +#endif }; /* ----------------------------------------------------------- */ |