Update of /cvsroot/alsa/alsa-kernel/pci/ice1712 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20010/pci/ice1712
Modified Files: ice1712.c ice1724.c Log Message: use the new module_param*() functions. Index: ice1712.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- ice1712.c 26 Mar 2004 12:25:51 -0000 1.47 +++ ice1712.c 7 Apr 2004 17:48:20 -0000 1.48 @@ -51,11 +51,11 @@ #include <linux/init.h> #include <linux/pci.h> #include <linux/slab.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/cs8427.h> #include <sound/info.h> #include <sound/mpu401.h> -#define SNDRV_GET_ID #include <sound/initval.h> #include <sound/asoundef.h> @@ -83,20 +83,21 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int omni[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; /* Delta44 & 66 Omni I/O support */ static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */ +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 ICE1712 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 ICE1712 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 ICE1712 soundcard."); MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); -MODULE_PARM(omni, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(omni, bool, boot_devs, 0444); MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support."); MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); -MODULE_PARM(cs8427_timeout, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(cs8427_timeout, int, boot_devs, 0444); MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution."); MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,1000}},default=500,skill:advanced"); @@ -2677,24 +2678,3 @@ module_init(alsa_card_ice1712_init) module_exit(alsa_card_ice1712_exit) - -#ifndef MODULE - -/* format is: snd-ice1712=enable,index,id */ - -static int __init alsa_card_ice1712_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); - nr_dev++; - return 1; -} - -__setup("snd-ice1712=", alsa_card_ice1712_setup); - -#endif /* ifndef MODULE */ Index: ice1724.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1724.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- ice1724.c 6 Mar 2004 16:51:30 -0000 1.27 +++ ice1724.c 7 Apr 2004 17:48:20 -0000 1.28 @@ -28,10 +28,10 @@ #include <linux/init.h> #include <linux/pci.h> #include <linux/slab.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/info.h> #include <sound/mpu401.h> -#define SNDRV_GET_ID #include <sound/initval.h> #include <sound/asoundef.h> @@ -62,14 +62,15 @@ 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] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ +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 ICE1724 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 ICE1724 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 ICE1724 soundcard."); MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); @@ -2159,24 +2160,3 @@ module_init(alsa_card_ice1724_init) module_exit(alsa_card_ice1724_exit) - -#ifndef MODULE - -/* format is: snd-ice1724=enable,index,id */ - -static int __init alsa_card_ice1724_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); - nr_dev++; - return 1; -} - -__setup("snd-ice1724=", alsa_card_ice1724_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