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

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

diff -u --recursive --new-file v2.3.24/linux/drivers/char/radio-zoltrix.c linux/drivers/char/radio-zoltrix.c
@@ -354,8 +354,12 @@
 	NULL
 };
 
-int __init zoltrix_init(struct video_init *v)
+static int __init zoltrix_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 "zoltrix: port 0x%x already in use\n", io);
 		return -EBUSY;
@@ -390,8 +394,6 @@
 	return 0;
 }
 
-#ifdef MODULE
-
 MODULE_AUTHOR("C.van Schaik");
 MODULE_DESCRIPTION("A driver for the Zoltrix Radio Plus.");
 MODULE_PARM(io, "i");
@@ -399,19 +401,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 zoltrix_init(NULL);
-}
-
-void cleanup_module(void)
+static void __exit zoltrix_cleanup_module(void)
 {
 	video_unregister_device(&zoltrix_radio);
 	release_region(io, 2);
 }
 
-#endif
+module_init(zoltrix_init);
+module_exit(zoltrix_cleanup_module);
+

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