aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/sound.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-09-05 17:15:37 +0200
committerJaroslav Kysela <perex@suse.cz>2005-09-12 10:41:49 +0200
commitecbcfe36fa882e9f8f2be63ac0c42978336bf997 (patch)
treeb43fe6845a9de4e077cfba15c214d66e74866486 /sound/core/sound.c
parent6243008b82222d6244b055beeeba94b14f23b7e2 (diff)
downloadkernel_samsung_espresso10-ecbcfe36fa882e9f8f2be63ac0c42978336bf997.zip
kernel_samsung_espresso10-ecbcfe36fa882e9f8f2be63ac0c42978336bf997.tar.gz
kernel_samsung_espresso10-ecbcfe36fa882e9f8f2be63ac0c42978336bf997.tar.bz2
[ALSA] Introduce snd_card_set_generic_dev()
ALSA Core A new function snd_card_set_generic_dev() is introduced to add the 'generic device' support for devices without proper bus on sysfs. It's a last resort, and should be removed in future when they have a proper bus, instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
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 3271e92..9e76bdd 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -328,6 +328,10 @@ int __exit snd_minor_info_done(void)
* INIT PART
*/
+#ifdef CONFIG_SND_GENERIC_DRIVER
+extern struct device_driver snd_generic_driver;
+#endif
+
static int __init alsa_sound_init(void)
{
short controlnum;
@@ -354,6 +358,9 @@ static int __init alsa_sound_init(void)
return -ENOMEM;
}
snd_info_minor_register();
+#ifdef CONFIG_SND_GENERIC_DRIVER
+ driver_register(&snd_generic_driver);
+#endif
for (controlnum = 0; controlnum < cards_limit; controlnum++)
devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
#ifndef MODULE
@@ -369,6 +376,9 @@ static void __exit alsa_sound_exit(void)
for (controlnum = 0; controlnum < cards_limit; controlnum++)
devfs_remove("snd/controlC%d", controlnum);
+#ifdef CONFIG_SND_GENERIC_DRIVER
+ driver_unregister(&snd_generic_driver);
+#endif
snd_info_minor_unregister();
snd_info_done();
snd_memory_done();
@@ -416,10 +426,13 @@ EXPORT_SYMBOL(snd_card_register);
EXPORT_SYMBOL(snd_component_add);
EXPORT_SYMBOL(snd_card_file_add);
EXPORT_SYMBOL(snd_card_file_remove);
+#ifdef CONFIG_SND_GENERIC_DRIVER
+EXPORT_SYMBOL(snd_card_set_generic_dev);
+#endif
#ifdef CONFIG_PM
EXPORT_SYMBOL(snd_power_wait);
EXPORT_SYMBOL(snd_card_set_pm_callback);
-#if defined(CONFIG_PM) && defined(CONFIG_SND_GENERIC_PM)
+#ifdef CONFIG_SND_GENERIC_DRIVER
EXPORT_SYMBOL(snd_card_set_generic_pm_callback);
#endif
#ifdef CONFIG_PCI