patch-2.4.0-test9 linux/drivers/sound/sound_core.c
Next file: linux/drivers/sound/sound_syms.c
Previous file: linux/drivers/sound/sonicvibes.c
Back to the patch index
Back to the overall index
- Lines: 69
- Date:
Mon Sep 25 12:32:54 2000
- Orig file:
v2.4.0-test8/linux/drivers/sound/sound_core.c
- Orig date:
Mon Aug 28 15:03:42 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/sound/sound_core.c linux/drivers/sound/sound_core.c
@@ -36,6 +36,7 @@
#include <linux/config.h>
#include <linux/module.h>
+#include <linux/init.h>
#include <linux/malloc.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@ -62,9 +63,6 @@
#ifdef CONFIG_SOUND_MSNDPIN
extern int msnd_pinnacle_init(void);
#endif
-#ifdef CONFIG_SOUND_CMPCI
-extern int init_cmpci(void);
-#endif
/*
* Low level list operator. Scan the ordered list, find a hole and
@@ -545,12 +543,11 @@
extern int mod_firmware_load(const char *, char **);
EXPORT_SYMBOL(mod_firmware_load);
-#ifdef MODULE
MODULE_DESCRIPTION("Core sound module");
MODULE_AUTHOR("Alan Cox");
-void cleanup_module(void)
+static void __exit cleanup_soundcore(void)
{
/* We have nothing to really do here - we know the lists must be
empty */
@@ -558,10 +555,7 @@
devfs_unregister (devfs_handle);
}
-int init_module(void)
-#else
-int soundcore_init(void)
-#endif
+static int __init init_soundcore(void)
{
if(devfs_register_chrdev(SOUND_MAJOR, "sound", &soundcore_fops)==-1)
{
@@ -569,20 +563,9 @@
return -EBUSY;
}
devfs_handle = devfs_mk_dir (NULL, "sound", NULL);
- /*
- * Now init non OSS drivers
- */
-#ifdef CONFIG_SOUND_CMPCI
- init_cmpci();
-#endif
-#ifdef CONFIG_SOUND_MSNDCLAS
- msnd_classic_init();
-#endif
-#ifdef CONFIG_SOUND_MSNDPIN
- msnd_pinnacle_init();
-#endif
-#ifdef CONFIG_SOUND_VWSND
- init_vwsnd();
-#endif
+
return 0;
}
+
+module_init(init_soundcore);
+module_exit(cleanup_soundcore);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)