Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20010/core
Modified Files: memalloc.c pcm_memory.c rawmidi.c rtctimer.c sound.c timer.c Log Message: use the new module_param*() functions. Index: memalloc.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/memalloc.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- memalloc.c 15 Mar 2004 18:02:31 -0000 1.28 +++ memalloc.c 7 Apr 2004 17:48:11 -0000 1.29 @@ -29,6 +29,7 @@ #include <linux/slab.h> #include <linux/mm.h> #include <linux/dma-mapping.h> +#include <linux/moduleparam.h> #include <asm/semaphore.h> #include <sound/memalloc.h> #ifdef CONFIG_SBUS @@ -45,7 +46,8 @@ #define SNDRV_CARDS 8 #endif static int enable[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; -MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +static int boot_devs; +module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable cards to allocate buffers."); /* @@ -842,25 +844,6 @@ module_exit(snd_mem_exit) -#ifndef MODULE - -/* format is: snd-page-alloc=enable */ - -static int __init snd_mem_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= SNDRV_CARDS) - return 0; - (void)(get_option(&str,&enable[nr_dev]) == 2); - nr_dev++; - return 1; -} - -__setup("snd-page-alloc=", snd_mem_setup); - -#endif - /* * exports */ Index: pcm_memory.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/pcm_memory.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- pcm_memory.c 6 Mar 2004 16:51:28 -0000 1.25 +++ pcm_memory.c 7 Apr 2004 17:48:11 -0000 1.26 @@ -23,18 +23,19 @@ #include <asm/io.h> #include <linux/time.h> #include <linux/init.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/info.h> #include <sound/initval.h> static int preallocate_dma = 1; -MODULE_PARM(preallocate_dma, "i"); +module_param(preallocate_dma, int, 0444); MODULE_PARM_DESC(preallocate_dma, "Preallocate DMA memory when the PCM devices are initialized."); MODULE_PARM_SYNTAX(preallocate_dma, SNDRV_BOOLEAN_TRUE_DESC); static int maximum_substreams = 4; -MODULE_PARM(maximum_substreams, "i"); +module_param(maximum_substreams, int, 0444); MODULE_PARM_DESC(maximum_substreams, "Maximum substreams with preallocated DMA memory."); MODULE_PARM_SYNTAX(maximum_substreams, SNDRV_BOOLEAN_TRUE_DESC); Index: rawmidi.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/rawmidi.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- rawmidi.c 1 Feb 2004 16:34:28 -0000 1.41 +++ rawmidi.c 7 Apr 2004 17:48:11 -0000 1.42 @@ -27,6 +27,7 @@ #include <linux/slab.h> #include <linux/time.h> #include <linux/wait.h> +#include <linux/moduleparam.h> #include <sound/rawmidi.h> #include <sound/info.h> #include <sound/control.h> @@ -40,10 +41,11 @@ #ifdef CONFIG_SND_OSSEMUL static int midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; -MODULE_PARM(midi_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +static int boot_devs; +module_param_array(midi_map, int, boot_devs, 0444); MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device."); MODULE_PARM_SYNTAX(midi_map, "default:0,skill:advanced"); -MODULE_PARM(amidi_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(amidi_map, int, boot_devs, 0444); MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device."); MODULE_PARM_SYNTAX(amidi_map, "default:1,skill:advanced"); #endif /* CONFIG_SND_OSSEMUL */ @@ -1637,26 +1639,6 @@ module_init(alsa_rawmidi_init) module_exit(alsa_rawmidi_exit) -#ifndef MODULE -#ifdef CONFIG_SND_OSSEMUL -/* format is: snd-rawmidi=midi_map,amidi_map */ - -static int __init alsa_rawmidi_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= SNDRV_CARDS) - return 0; - (void)(get_option(&str,&midi_map[nr_dev]) == 2 && - get_option(&str,&amidi_map[nr_dev]) == 2); - nr_dev++; - return 1; -} - -__setup("snd-rawmidi=", alsa_rawmidi_setup); -#endif /* CONFIG_SND_OSSEMUL */ -#endif /* ifndef MODULE */ - EXPORT_SYMBOL(snd_rawmidi_output_params); EXPORT_SYMBOL(snd_rawmidi_input_params); EXPORT_SYMBOL(snd_rawmidi_drop_output); Index: rtctimer.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/rtctimer.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- rtctimer.c 21 Jul 2003 16:59:06 -0000 1.19 +++ rtctimer.c 7 Apr 2004 17:48:11 -0000 1.20 @@ -25,6 +25,7 @@ #include <linux/time.h> #include <linux/threads.h> #include <linux/interrupt.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/timer.h> #include <sound/info.h> @@ -177,21 +178,9 @@ module_init(rtctimer_init) module_exit(rtctimer_exit) -MODULE_PARM(rtctimer_freq, "i"); +module_param(rtctimer_freq, int, 0444); MODULE_PARM_DESC(rtctimer_freq, "timer frequency in Hz"); MODULE_LICENSE("GPL"); -#ifndef MODULE -/* format is: snd-rtctimer=freq */ - -static int __init rtctimer_setup(char *str) -{ - (void)(get_option(&str,&rtctimer_freq) == 2); - return 1; -} - -__setup("snd-rtctimer=", rtctimer_setup); -#endif /* ifndef MODULE */ - #endif /* CONFIG_RTC || CONFIG_RTC_MODULE */ Index: sound.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/sound.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- sound.c 27 Feb 2004 19:34:22 -0000 1.59 +++ sound.c 7 Apr 2004 17:48:11 -0000 1.60 @@ -23,6 +23,7 @@ #include <linux/init.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/minors.h> #include <sound/info.h> @@ -45,15 +46,15 @@ MODULE_LICENSE("GPL"); MODULE_CLASSES("{sound}"); MODULE_SUPPORTED_DEVICE("sound"); -MODULE_PARM(major, "i"); +module_param(major, int, 0444); MODULE_PARM_DESC(major, "Major # for sound driver."); MODULE_PARM_SYNTAX(major, "default:116,skill:devel"); -MODULE_PARM(cards_limit, "i"); +module_param(cards_limit, int, 0444); MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); MODULE_PARM_SYNTAX(cards_limit, "default:8,skill:advanced"); MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); #ifdef CONFIG_DEVFS_FS -MODULE_PARM(device_mode, "i"); +module_param(device_mode, int, 0444); MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs."); MODULE_PARM_SYNTAX(device_mode, "default:0666,base:8"); #endif Index: timer.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/timer.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- timer.c 6 Apr 2004 17:23:46 -0000 1.56 +++ timer.c 7 Apr 2004 17:48:11 -0000 1.57 @@ -24,6 +24,7 @@ #include <linux/init.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/moduleparam.h> #include <sound/core.h> #include <sound/timer.h> #include <sound/control.h> @@ -46,7 +47,7 @@ MODULE_DESCRIPTION("ALSA timer interface"); MODULE_LICENSE("GPL"); MODULE_CLASSES("{sound}"); -MODULE_PARM(timer_limit, "i"); +module_param(timer_limit, int, 0444); MODULE_PARM_DESC(timer_limit, "Maximum global timers in system."); typedef struct { @@ -1863,18 +1864,6 @@ module_init(alsa_timer_init) module_exit(alsa_timer_exit) -#ifndef MODULE -/* format is: snd-timer=timer_limit */ - -static int __init alsa_timer_setup(char *str) -{ - (void)(get_option(&str,&timer_limit) == 2); - return 1; -} - -__setup("snd-timer=", alsa_timer_setup); -#endif /* ifndef MODULE */ - EXPORT_SYMBOL(snd_timer_open); EXPORT_SYMBOL(snd_timer_close); EXPORT_SYMBOL(snd_timer_resolution); ------------------------------------------------------- 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