patch-2.4.0-test11 linux/drivers/sound/cs4232.c

Next file: linux/drivers/sound/cs4281.c
Previous file: linux/drivers/sound/cmpci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test10/linux/drivers/sound/cs4232.c linux/drivers/sound/cs4232.c
@@ -40,6 +40,8 @@
  *	Christoph Hellwig	Adapted to module_init/module_exit,
  * 					simple cleanups
  * 	Arnaldo C. de Melo	got rid of attach_uart401
+ *	Bartlomiej Zolnierkiewicz
+ *				Added some __init/__initdata/__exit
  */
 
 #include <linux/config.h>
@@ -67,7 +69,7 @@
 static int synth_base = 0, synth_irq = 0;
 static int mpu_detected = 0;
 
-int probe_cs4232_mpu(struct address_info *hw_config)
+int __init probe_cs4232_mpu(struct address_info *hw_config)
 {
 	/*
 	 *	Just write down the config values.
@@ -79,7 +81,7 @@
 	return 1;
 }
 
-static unsigned char crystal_key[] =	/* A 32 byte magic key sequence */
+static unsigned char crystal_key[] __initdata =	/* A 32 byte magic key sequence */
 {
 	0x96, 0x35, 0x9a, 0xcd, 0xe6, 0xf3, 0x79, 0xbc,
 	0x5e, 0xaf, 0x57, 0x2b, 0x15, 0x8a, 0xc5, 0xe2,
@@ -93,7 +95,7 @@
 	schedule_timeout(howlong);
 }
 
-int probe_cs4232(struct address_info *hw_config)
+int __init probe_cs4232(struct address_info *hw_config)
 {
 	int i, n;
 	int base = hw_config->io_base, irq = hw_config->irq;
@@ -209,7 +211,7 @@
 	return 0;
 }
 
-void attach_cs4232(struct address_info *hw_config)
+void __init attach_cs4232(struct address_info *hw_config)
 {
 	int base = hw_config->io_base,
 		irq = hw_config->irq,
@@ -268,7 +270,7 @@
 	}
 }
 
-void unload_cs4232(struct address_info *hw_config)
+void __exit unload_cs4232(struct address_info *hw_config)
 {
 	int base = hw_config->io_base, irq = hw_config->irq;
 	int dma1 = hw_config->dma, dma2 = hw_config->dma2;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)