patch-2.3.25 linux/drivers/char/radio-rtrack2.c
Next file: linux/drivers/char/radio-sf16fmi.c
Previous file: linux/drivers/char/radio-cadet.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Thu Oct 28 16:12:56 1999
- Orig file:
v2.3.24/linux/drivers/char/radio-rtrack2.c
- Orig date:
Mon Oct 4 15:49:29 1999
diff -u --recursive --new-file v2.3.24/linux/drivers/char/radio-rtrack2.c linux/drivers/char/radio-rtrack2.c
@@ -228,8 +228,13 @@
NULL
};
-int __init rtrack2_init(struct video_init *v)
+static int __init rtrack2_init(void)
{
+ if(io==-1)
+ {
+ printk(KERN_ERR "You must set an I/O address with io=0x20c or io=0x30c\n");
+ return -EINVAL;
+ }
if (check_region(io, 4))
{
printk(KERN_ERR "rtrack2: port 0x%x already in use\n", io);
@@ -252,8 +257,6 @@
return 0;
}
-#ifdef MODULE
-
MODULE_AUTHOR("Ben Pfaff");
MODULE_DESCRIPTION("A driver for the RadioTrack II radio card.");
MODULE_PARM(io, "i");
@@ -261,23 +264,14 @@
EXPORT_NO_SYMBOLS;
-int init_module(void)
-{
- if(io==-1)
- {
- printk(KERN_ERR "You must set an I/O address with io=0x20c or io=0x30c\n");
- return -EINVAL;
- }
- return rtrack2_init(NULL);
-}
-
-void cleanup_module(void)
+static void __exit rtrack2_cleanup_module(void)
{
video_unregister_device(&rtrack2_radio);
release_region(io,4);
}
-#endif
+module_init(rtrack2_init);
+module_exit(rtrack2_cleanup_module);
/*
Local variables:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)