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.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 3271e9245490..9e76bddb2c0b 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -328,6 +328,10 @@ int __exit snd_minor_info_done(void)
328 * INIT PART 328 * INIT PART
329 */ 329 */
330 330
331#ifdef CONFIG_SND_GENERIC_DRIVER
332extern struct device_driver snd_generic_driver;
333#endif
334
331static int __init alsa_sound_init(void) 335static int __init alsa_sound_init(void)
332{ 336{
333 short controlnum; 337 short controlnum;
@@ -354,6 +358,9 @@ static int __init alsa_sound_init(void)
354 return -ENOMEM; 358 return -ENOMEM;
355 } 359 }
356 snd_info_minor_register(); 360 snd_info_minor_register();
361#ifdef CONFIG_SND_GENERIC_DRIVER
362 driver_register(&snd_generic_driver);
363#endif
357 for (controlnum = 0; controlnum < cards_limit; controlnum++) 364 for (controlnum = 0; controlnum < cards_limit; controlnum++)
358 devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); 365 devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
359#ifndef MODULE 366#ifndef MODULE
@@ -369,6 +376,9 @@ static void __exit alsa_sound_exit(void)
369 for (controlnum = 0; controlnum < cards_limit; controlnum++) 376 for (controlnum = 0; controlnum < cards_limit; controlnum++)
370 devfs_remove("snd/controlC%d", controlnum); 377 devfs_remove("snd/controlC%d", controlnum);
371 378
379#ifdef CONFIG_SND_GENERIC_DRIVER
380 driver_unregister(&snd_generic_driver);
381#endif
372 snd_info_minor_unregister(); 382 snd_info_minor_unregister();
373 snd_info_done(); 383 snd_info_done();
374 snd_memory_done(); 384 snd_memory_done();
@@ -416,10 +426,13 @@ EXPORT_SYMBOL(snd_card_register);
416EXPORT_SYMBOL(snd_component_add); 426EXPORT_SYMBOL(snd_component_add);
417EXPORT_SYMBOL(snd_card_file_add); 427EXPORT_SYMBOL(snd_card_file_add);
418EXPORT_SYMBOL(snd_card_file_remove); 428EXPORT_SYMBOL(snd_card_file_remove);
429#ifdef CONFIG_SND_GENERIC_DRIVER
430EXPORT_SYMBOL(snd_card_set_generic_dev);
431#endif
419#ifdef CONFIG_PM 432#ifdef CONFIG_PM
420EXPORT_SYMBOL(snd_power_wait); 433EXPORT_SYMBOL(snd_power_wait);
421EXPORT_SYMBOL(snd_card_set_pm_callback); 434EXPORT_SYMBOL(snd_card_set_pm_callback);
422#if defined(CONFIG_PM) && defined(CONFIG_SND_GENERIC_PM) 435#ifdef CONFIG_SND_GENERIC_DRIVER
423EXPORT_SYMBOL(snd_card_set_generic_pm_callback); 436EXPORT_SYMBOL(snd_card_set_generic_pm_callback);
424#endif 437#endif
425#ifdef CONFIG_PCI 438#ifdef CONFIG_PCI