Update of /cvsroot/alsa/alsa-kernel/pci/trident In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20010/pci/trident
Modified Files: trident.c Log Message: use the new module_param*() functions. Index: trident.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/trident/trident.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- trident.c 26 Jan 2004 14:27:13 -0000 1.21 +++ trident.c 7 Apr 2004 17:48:21 -0000 1.22 @@ -25,9 +25,9 @@ #include <linux/init.h> #include <linux/pci.h> #include <linux/time.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/trident.h> -#define SNDRV_GET_ID #include <sound/initval.h> MODULE_AUTHOR("Jaroslav Kysela <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>"); @@ -52,20 +52,21 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32}; static int wavetable_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8192}; +static int boot_devs; -MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Trident 4DWave PCI soundcard."); MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); -MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s"); +module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Trident 4DWave PCI soundcard."); MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); -MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Trident 4DWave PCI soundcard."); MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); -MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}"); -MODULE_PARM(wavetable_size, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(wavetable_size, int, boot_devs, 0444); MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); MODULE_PARM_SYNTAX(wavetable_size, SNDRV_ENABLED ",default:8192,skill:advanced"); @@ -228,27 +229,3 @@ module_init(alsa_card_trident_init) module_exit(alsa_card_trident_exit) - -#ifndef MODULE - -/* format is: snd-trident=enable,index,id, - pcm_channels,wavetable_size */ - -static int __init alsa_card_trident_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= SNDRV_CARDS) - return 0; - (void)(get_option(&str,&enable[nr_dev]) == 2 && - get_option(&str,&index[nr_dev]) == 2 && - get_id(&str,&id[nr_dev]) == 2 && - get_option(&str,&pcm_channels[nr_dev]) == 2 && - get_option(&str,&wavetable_size[nr_dev]) == 2); - nr_dev++; - return 1; -} - -__setup("snd-trident=", alsa_card_trident_setup); - -#endif /* ifndef MODULE */ ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog