Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: remove CONFIG_KMOD from sound

A bunch of things in alsa depend on CONFIG_KMOD,
use CONFIG_MODULES instead where the dependency
is needed at all.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

authored by

Johannes Berg and committed by
Jaroslav Kysela
ee2da997 7fc077fb

+11 -17
+1 -1
include/sound/seq_kernel.h
··· 105 105 int cap, int type, int midi_channels, int midi_voices, char *portname); 106 106 int snd_seq_event_port_detach(int client, int port); 107 107 108 - #ifdef CONFIG_KMOD 108 + #ifdef CONFIG_MODULES 109 109 void snd_seq_autoload_lock(void); 110 110 void snd_seq_autoload_unlock(void); 111 111 #else
+1 -1
sound/core/seq/seq_clientmgr.c
··· 148 148 return NULL; 149 149 } 150 150 spin_unlock_irqrestore(&clients_lock, flags); 151 - #ifdef CONFIG_KMOD 151 + #ifdef CONFIG_MODULES 152 152 if (!in_interrupt()) { 153 153 static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS]; 154 154 static char card_requested[SNDRV_CARDS];
+2 -4
sound/core/seq/seq_device.c
··· 124 124 * load all registered drivers (called from seq_clientmgr.c) 125 125 */ 126 126 127 - #ifdef CONFIG_KMOD 127 + #ifdef CONFIG_MODULES 128 128 /* avoid auto-loading during module_init() */ 129 129 static int snd_seq_in_init; 130 130 void snd_seq_autoload_lock(void) ··· 140 140 141 141 void snd_seq_device_load_drivers(void) 142 142 { 143 - #ifdef CONFIG_KMOD 143 + #ifdef CONFIG_MODULES 144 144 struct ops_list *ops; 145 145 146 146 /* Calling request_module during module_init() ··· 566 566 EXPORT_SYMBOL(snd_seq_device_new); 567 567 EXPORT_SYMBOL(snd_seq_device_register_driver); 568 568 EXPORT_SYMBOL(snd_seq_device_unregister_driver); 569 - #ifdef CONFIG_KMOD 570 569 EXPORT_SYMBOL(snd_seq_autoload_lock); 571 570 EXPORT_SYMBOL(snd_seq_autoload_unlock); 572 - #endif
+4 -4
sound/core/sound.c
··· 60 60 static struct snd_minor *snd_minors[SNDRV_OS_MINORS]; 61 61 static DEFINE_MUTEX(sound_mutex); 62 62 63 - #ifdef CONFIG_KMOD 63 + #ifdef CONFIG_MODULES 64 64 65 65 /** 66 66 * snd_request_card - try to load the card module 67 67 * @card: the card number 68 68 * 69 69 * Tries to load the module "snd-card-X" for the given card number 70 - * via KMOD. Returns immediately if already loaded. 70 + * via request_module. Returns immediately if already loaded. 71 71 */ 72 72 void snd_request_card(int card) 73 73 { ··· 92 92 request_module(str); 93 93 } 94 94 95 - #endif /* request_module support */ 95 + #endif /* modular kernel */ 96 96 97 97 /** 98 98 * snd_lookup_minor_data - get user data of a registered device ··· 132 132 return -ENODEV; 133 133 mptr = snd_minors[minor]; 134 134 if (mptr == NULL) { 135 - #ifdef CONFIG_KMOD 135 + #ifdef CONFIG_MODULES 136 136 int dev = SNDRV_MINOR_DEVICE(minor); 137 137 if (dev == SNDRV_MINOR_CONTROL) { 138 138 /* /dev/aloadC? */
+3 -3
sound/core/timer.c
··· 146 146 return NULL; 147 147 } 148 148 149 - #ifdef CONFIG_KMOD 149 + #ifdef CONFIG_MODULES 150 150 151 151 static void snd_timer_request(struct snd_timer_id *tid) 152 152 { ··· 259 259 /* open a master instance */ 260 260 mutex_lock(&register_mutex); 261 261 timer = snd_timer_find(tid); 262 - #ifdef CONFIG_KMOD 263 - if (timer == NULL) { 262 + #ifdef CONFIG_MODULES 263 + if (!timer) { 264 264 mutex_unlock(&register_mutex); 265 265 snd_timer_request(tid); 266 266 mutex_lock(&register_mutex);
-2
sound/ppc/daca.c
··· 249 249 int i, err; 250 250 struct pmac_daca *mix; 251 251 252 - #ifdef CONFIG_KMOD 253 252 request_module("i2c-powermac"); 254 - #endif /* CONFIG_KMOD */ 255 253 256 254 mix = kzalloc(sizeof(*mix), GFP_KERNEL); 257 255 if (! mix)
-2
sound/ppc/tumbler.c
··· 1350 1350 struct device_node *tas_node, *np; 1351 1351 char *chipname; 1352 1352 1353 - #ifdef CONFIG_KMOD 1354 1353 request_module("i2c-powermac"); 1355 - #endif /* CONFIG_KMOD */ 1356 1354 1357 1355 mix = kzalloc(sizeof(*mix), GFP_KERNEL); 1358 1356 if (! mix)