Skip to content

Commit ee2da99

Browse files
jmbergperexg
authored andcommitted
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>
1 parent 7fc077f commit ee2da99

7 files changed

Lines changed: 11 additions & 17 deletions

File tree

‎include/sound/seq_kernel.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
105105
int cap, int type, int midi_channels, int midi_voices, char *portname);
106106
int snd_seq_event_port_detach(int client, int port);
107107

108-
#ifdef CONFIG_KMOD
108+
#ifdef CONFIG_MODULES
109109
void snd_seq_autoload_lock(void);
110110
void snd_seq_autoload_unlock(void);
111111
#else

‎sound/core/seq/seq_clientmgr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
148148
return NULL;
149149
}
150150
spin_unlock_irqrestore(&clients_lock, flags);
151-
#ifdef CONFIG_KMOD
151+
#ifdef CONFIG_MODULES
152152
if (!in_interrupt()) {
153153
static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS];
154154
static char card_requested[SNDRV_CARDS];

‎sound/core/seq/seq_device.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void snd_seq_device_info(struct snd_info_entry *entry,
124124
* load all registered drivers (called from seq_clientmgr.c)
125125
*/
126126

127-
#ifdef CONFIG_KMOD
127+
#ifdef CONFIG_MODULES
128128
/* avoid auto-loading during module_init() */
129129
static int snd_seq_in_init;
130130
void snd_seq_autoload_lock(void)
@@ -140,7 +140,7 @@ void snd_seq_autoload_unlock(void)
140140

141141
void snd_seq_device_load_drivers(void)
142142
{
143-
#ifdef CONFIG_KMOD
143+
#ifdef CONFIG_MODULES
144144
struct ops_list *ops;
145145

146146
/* Calling request_module during module_init()
@@ -566,7 +566,5 @@ EXPORT_SYMBOL(snd_seq_device_load_drivers);
566566
EXPORT_SYMBOL(snd_seq_device_new);
567567
EXPORT_SYMBOL(snd_seq_device_register_driver);
568568
EXPORT_SYMBOL(snd_seq_device_unregister_driver);
569-
#ifdef CONFIG_KMOD
570569
EXPORT_SYMBOL(snd_seq_autoload_lock);
571570
EXPORT_SYMBOL(snd_seq_autoload_unlock);
572-
#endif

‎sound/core/sound.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ EXPORT_SYMBOL(snd_ecards_limit);
6060
static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
6161
static DEFINE_MUTEX(sound_mutex);
6262

63-
#ifdef CONFIG_KMOD
63+
#ifdef CONFIG_MODULES
6464

6565
/**
6666
* snd_request_card - try to load the card module
6767
* @card: the card number
6868
*
6969
* 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.
7171
*/
7272
void snd_request_card(int card)
7373
{
@@ -92,7 +92,7 @@ static void snd_request_other(int minor)
9292
request_module(str);
9393
}
9494

95-
#endif /* request_module support */
95+
#endif /* modular kernel */
9696

9797
/**
9898
* snd_lookup_minor_data - get user data of a registered device
@@ -132,7 +132,7 @@ static int snd_open(struct inode *inode, struct file *file)
132132
return -ENODEV;
133133
mptr = snd_minors[minor];
134134
if (mptr == NULL) {
135-
#ifdef CONFIG_KMOD
135+
#ifdef CONFIG_MODULES
136136
int dev = SNDRV_MINOR_DEVICE(minor);
137137
if (dev == SNDRV_MINOR_CONTROL) {
138138
/* /dev/aloadC? */

‎sound/core/timer.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static struct snd_timer *snd_timer_find(struct snd_timer_id *tid)
146146
return NULL;
147147
}
148148

149-
#ifdef CONFIG_KMOD
149+
#ifdef CONFIG_MODULES
150150

151151
static void snd_timer_request(struct snd_timer_id *tid)
152152
{
@@ -259,8 +259,8 @@ int snd_timer_open(struct snd_timer_instance **ti,
259259
/* open a master instance */
260260
mutex_lock(&register_mutex);
261261
timer = snd_timer_find(tid);
262-
#ifdef CONFIG_KMOD
263-
if (timer == NULL) {
262+
#ifdef CONFIG_MODULES
263+
if (!timer) {
264264
mutex_unlock(&register_mutex);
265265
snd_timer_request(tid);
266266
mutex_lock(&register_mutex);

‎sound/ppc/daca.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ int __init snd_pmac_daca_init(struct snd_pmac *chip)
249249
int i, err;
250250
struct pmac_daca *mix;
251251

252-
#ifdef CONFIG_KMOD
253252
request_module("i2c-powermac");
254-
#endif /* CONFIG_KMOD */
255253

256254
mix = kzalloc(sizeof(*mix), GFP_KERNEL);
257255
if (! mix)

‎sound/ppc/tumbler.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,9 +1350,7 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
13501350
struct device_node *tas_node, *np;
13511351
char *chipname;
13521352

1353-
#ifdef CONFIG_KMOD
13541353
request_module("i2c-powermac");
1355-
#endif /* CONFIG_KMOD */
13561354

13571355
mix = kzalloc(sizeof(*mix), GFP_KERNEL);
13581356
if (! mix)

0 commit comments

Comments
 (0)