patch-2.3.50 linux/drivers/sound/vidc.c
Next file: linux/drivers/sound/waveartist.c
Previous file: linux/drivers/sound/via82cxxx_audio.c
Back to the patch index
Back to the overall index
- Lines: 71
- Date:
Tue Mar 7 13:40:24 2000
- Orig file:
v2.3.49/linux/drivers/sound/vidc.c
- Orig date:
Thu Mar 2 14:36:23 2000
diff -u --recursive --new-file v2.3.49/linux/drivers/sound/vidc.c linux/drivers/sound/vidc.c
@@ -14,6 +14,7 @@
*/
#include <linux/config.h>
+#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -412,7 +413,7 @@
}
}
-void attach_vidc(struct address_info *hw_config)
+static void __init attach_vidc(struct address_info *hw_config)
{
char name[32];
int i, adev;
@@ -486,7 +487,7 @@
return;
}
-int probe_vidc(struct address_info *hw_config)
+static int __init probe_vidc(struct address_info *hw_config)
{
hw_config->irq = IRQ_DMAS0;
hw_config->dma = DMA_VIRTUAL_SOUND;
@@ -496,7 +497,7 @@
return 1;
}
-void unload_vidc(struct address_info *hw_config)
+static void __exit unload_vidc(struct address_info *hw_config)
{
int i, adev = vidc_adev;
@@ -516,27 +517,27 @@
}
}
-#ifdef MODULE
-static struct address_info config;
+static struct address_info cfg;
/*
* Note! Module use count is handled by SOUNDLOCK/SOUND_LOCK_END
*/
-int init_module(void)
+static int __init init_vidc(void)
{
- if (probe_vidc(&config) == 0)
+ if (probe_vidc(&cfg) == 0)
return -ENODEV;
SOUND_LOCK;
- attach_vidc(&config);
+ attach_vidc(&cfg);
return 0;
}
-void cleanup_module(void)
+static void __exit cleanup_vidc(void)
{
- unload_vidc(&config);
+ unload_vidc(&cfg);
SOUND_LOCK_END;
}
-#endif
+module_init(init_vidc);
+module_exit(cleanup_vidc);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)