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/saa7134/saa7134-core.c | |
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/saa7134/saa7134-core.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 23 |
1 files changed, 19 insertions, 4 deletions
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); } |