patch-2.3.25 linux/drivers/char/radio-sf16fmi.c

Next file: linux/drivers/char/radio-terratec.c
Previous file: linux/drivers/char/radio-rtrack2.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/drivers/char/radio-sf16fmi.c linux/drivers/char/radio-sf16fmi.c
@@ -289,8 +289,13 @@
 	NULL
 };
 
-int __init fmi_init(struct video_init *v)
+static int __init fmi_init(void)
 {
+	if(io==-1)
+	{
+		printk(KERN_ERR "You must set an I/O address with io=0x???\n");
+		return -EINVAL;
+	}
 	if (check_region(io, 2)) 
 	{
 		printk(KERN_ERR "fmi: port 0x%x already in use\n", io);
@@ -316,8 +321,6 @@
 	return 0;
 }
 
-#ifdef MODULE
-
 MODULE_AUTHOR("Petr Vandrovec, vandrove@vc.cvut.cz and M. Kirkwood");
 MODULE_DESCRIPTION("A driver for the SF16MI radio.");
 MODULE_PARM(io, "i");
@@ -325,20 +328,12 @@
 
 EXPORT_NO_SYMBOLS;
 
-int init_module(void)
-{
-	if(io==-1)
-	{
-		printk(KERN_ERR "You must set an I/O address with io=0x???\n");
-		return -EINVAL;
-	}
-	return fmi_init(NULL);
-}
-
-void cleanup_module(void)
+static void __exit fmi_cleanup_module(void)
 {
 	video_unregister_device(&fmi_radio);
 	release_region(io,2);
 }
 
-#endif
+module_init(fmi_init);
+module_exit(fmi_cleanup_module);
+

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