aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r--sound/core/sound.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 5fc93d00572a..e5d37bd7c226 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -334,9 +334,6 @@ EXPORT_SYMBOL(snd_unregister_device);
334/* 334/*
335 * INFO PART 335 * INFO PART
336 */ 336 */
337
338static struct snd_info_entry *snd_minor_info_entry;
339
340static const char *snd_device_type_name(int type) 337static const char *snd_device_type_name(int type)
341{ 338{
342 switch (type) { 339 switch (type) {
@@ -389,21 +386,10 @@ int __init snd_minor_info_init(void)
389 struct snd_info_entry *entry; 386 struct snd_info_entry *entry;
390 387
391 entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL); 388 entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL);
392 if (entry) { 389 if (!entry)
393 entry->c.text.read = snd_minor_info_read; 390 return -ENOMEM;
394 if (snd_info_register(entry) < 0) { 391 entry->c.text.read = snd_minor_info_read;
395 snd_info_free_entry(entry); 392 return snd_info_register(entry); /* freed in error path */
396 entry = NULL;
397 }
398 }
399 snd_minor_info_entry = entry;
400 return 0;
401}
402
403int __exit snd_minor_info_done(void)
404{
405 snd_info_free_entry(snd_minor_info_entry);
406 return 0;
407} 393}
408#endif /* CONFIG_PROC_FS */ 394#endif /* CONFIG_PROC_FS */
409 395
@@ -423,7 +409,6 @@ static int __init alsa_sound_init(void)
423 unregister_chrdev(major, "alsa"); 409 unregister_chrdev(major, "alsa");
424 return -ENOMEM; 410 return -ENOMEM;
425 } 411 }
426 snd_info_minor_register();
427#ifndef MODULE 412#ifndef MODULE
428 pr_info("Advanced Linux Sound Architecture Driver Initialized.\n"); 413 pr_info("Advanced Linux Sound Architecture Driver Initialized.\n");
429#endif 414#endif
@@ -432,7 +417,6 @@ static int __init alsa_sound_init(void)
432 417
433static void __exit alsa_sound_exit(void) 418static void __exit alsa_sound_exit(void)
434{ 419{
435 snd_info_minor_unregister();
436 snd_info_done(); 420 snd_info_done();
437 unregister_chrdev(major, "alsa"); 421 unregister_chrdev(major, "alsa");
438} 422}